Forum: help
Monitor Forum | Start New ThreadError in ordering box plots according de mean [ Reply ] By: David Gramaje on 2018-03-08 17:11 | [forum:45745] |
Hi all, I got an error message when trying to order my data in box plots according to means. Attached the scripts and the error. > Tempranillo <- read.table("/Users/davidgramaje/Desktop/Tempranillo_def.csv", header=T, sep=",") > attach(Tempranillo) > names (Tempranillo) [1] "CLON" "LESION" > quantile(LESION, probs=c(0, 0.25, 0.5, 0.75, 1)) 0% 25% 50% 75% 100% 0.000 8.000 13.811 26.000 177.183 > boxplot (LESION~CLON, Tempranillo) > spray2 <- with(Tempranillo, factor(CLON, levels=levels(CLON)[order(tapply(LESION,CLON,mean))])) > boxplot(LESION~spray2, Tempranillo) Error in boxplot.default(split(mf[[response]], mf[-response], drop = drop, : invalid first argument Thanks for your help David |