hello, I am very new to R. My current data set is a mix of values and categories. It is a geoscience data set, with values per rock sample. Case in point, each sample belongs to a lithology class, and each sample has several physical property measurements (density, porosity...).
I want to be able to plot these physical properties for all samples in each lithology class. this is how i'm doing it now: > tc = read.table(....) > attach(tc) > names(tc) tc = [1] "Well" "Depth" "Latitude" "Longitude" [5] "Formation" "Lithology" "LithClass" "CondUncert" [9] "sample.ID" "Conductivity" "Density" "Porosity" > plot(Depth[LithClass=='sand'], Conductivity[LithClass=='sand']) (ad nauseum... how can I loop through them all?) and ... > boxplot(Conductivity[LithClass=='clay']) > boxplot(Conductivity~LithClass) # whole set of boxplots on one diagram, but # what if want to exclude one or two of the LithClasses? and ... > pairs(c(tc[10],tc[2],tc[11],tc[12])) this is as advanced as I've got. Any tips would be greatly appreciated. Ben. [[alternative HTML version deleted]] ______________________________________________ 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.