Getting the following error when trying to draw boxplots
Error in attr(groups, "names") <- names : 'names' attribute [5] must be the same length as the vector [2]
I'm trying to create a graph with 5 box and whisker plots in it by doing the following
boxplot(newton.FS.df,newton.B.df,newton.NFS.df,newton.NAFS.df,newton.AFS.df,
col=(5),
main="Strata VS Refractive Index",
names=c("FS","B","NFS","NAFS","AFS"),
ylab="Refractive Index")
Where i have already saved newton.FS.df and so on as the values I need - why am I getting this error? is it because I only have two columns in my data? How do I make 5 boxplots in a graph with only two columns of data?