Let's say I have this error in plain text:
Error in quantile.default(as.numeric(x), c(0.25, 0.75), na.rm = na.rm, : missing values and NaN's not allowed if 'na.rm' is FALSE In addition: Warning message: In quantile(as.numeric(x), c(0.25, 0.75), na.rm = na.rm, names = FALSE, : NAs introduced by coercion
How should be formatted when asking, like a code:
Error in quantile.default(as.numeric(x), c(0.25, 0.75), na.rm = na.rm, : missing values and NaN's not allowed if 'na.rm' is FALSE In addition: Warning message: In quantile(as.numeric(x), c(0.25, 0.75), na.rm = na.rm, names = FALSE, : NAs introduced by coercion
Or like a quotation?
Error in quantile.default(as.numeric(x), c(0.25, 0.75), na.rm = na.rm, : missing values and NaN's not allowed if 'na.rm' is FALSE In addition: Warning message: In quantile(as.numeric(x), c(0.25, 0.75), na.rm = na.rm, names = FALSE, : NAs introduced by coercion
In this case I would go for the quotation because it is easier to read. But which is the official position if any of SO?
I have seen both, most questions seem to use code formatting, but sometimes I've seen them use the quotation format.