On 04/04/2014 02:20 PM, David Doyle wrote:
HI folks

I'm wanting to do box plots of just 2 of my wells.

I can do it for all of them by using

boxplot(Barium~Well.ID,data=mydata, main="Barium", ylab="mg/L")

to do for all 4 wells
Anyone have a sugestion on how to do it for only 2 wells like MW-1 and MW-2?

The data can be found?
http://www.doylesdartden.com/TEMP/mydata.csv


Hi David,
Try this:

dddf<-read.csv("mydata.csv")
dddf12<-dddf[dddf$Well.ID=="MW-1" | dddf$Well.ID=="MW-2",]
dddf12$Well.ID<-factor(dddf12$Well.ID,levels=c("MW-1","MW-2"))
boxplot(Barium~Well.ID,dddf12)

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to