[R] Boxplot Help for Neophyte

From: Alex Park <alex.park1_at_ntlworld.com>
Date: Tue 21 Feb 2006 - 07:27:35 EST


R helpers

I am getting to grips with R but came across a small problem today that I could not fix by myself.

I have 3 text files, each with a single column of data. I read them in using:

myData1<-scan("C:/Program Files/R/myData1.txt")
myData2<-scan("C:/Program Files/R/myData2.txt")
myData3<-scan("C:/Program Files/R/myData3.txt")

I wanted to produce a chart with 3 boxplots of the data and used:

boxplot(myData1, myData2, myData3)

This worked fine so I consulted R [help(bxp)] to add some format and labels e.g. title= , xlab =, ylab= , notch=TRUE etc. I managed to figure that ok.

However, I could not figure out how to get the labels myData1, myData2, and myData3 on the boxplot x-axis to denote which box was which (though I knew by looking). Can anybody help with this?

I trawled through my downloaded R pdfs but could not find a way.

Regards

Alex Park



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Feb 21 07:32:27 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:38 EST