I have a data frame with columns that contain data of unequal length that are padded with NA's (i.e., column 1 is 1:136, column 2 is 1:680, column 3 is 1:2380 with the remaining rows filled with NA). I want to create boxplots with the data organized by columns in this data frame. I attempted to use boxplot.matrix:
boxplot.matrix(dataframe,use.cols=TRUE)
But I get the following error:
Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
'x' must be atomic
In addition: Warning message:
In split.default(c(x), rep.int(1L:ncol(x), rep.int(nrow(x), ncol(x)))) :
data length is not a multiple of split variable
I'm not sure if the error has to do with needing to handle NA's or if I can't use boxplot.matrix with columns of unequal data counts? Or something completely different? The simple boxplot command works with a comma separated list of each column, but this is unwieldy with a wider data frame.
boxplot.matrixwith matrices, not dataframes?... - Cath