Best contributors to the R-project. I have noticed that when using boxplot diagrams, R interprets the following two inputs very differently. 1: boxplot(biomass,clipping) 2:boxplot(biomass~clipping) What is the significance of tilde in the boxplot graph. I have not found it as one of the arguments when using the help function ?boxplot. Thankful for any help with this. Best regards, Petter Hedberg, University of Warsaw
Tilde in boxplots
5 messages · Petter Hedberg, Bert Gunter, Gilbert Brenes +2 more
boxplot is an (S3) generic function: ?UseMethod 1. Uses the default method. 2. Uses the formula method, since biomass~clipping is a formula: ?"~" ; ?formula; ?boxplot. See also an Introduction to R where these matters are also explained. -- Bert Gunter, Genentech -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Petter Hedberg Sent: Thursday, February 12, 2009 6:45 AM To: r-help at r-project.org Subject: [R] Tilde in boxplots Best contributors to the R-project. I have noticed that when using boxplot diagrams, R interprets the following two inputs very differently. 1: boxplot(biomass,clipping) 2:boxplot(biomass~clipping) What is the significance of tilde in the boxplot graph. I have not found it as one of the arguments when using the help function ?boxplot. Thankful for any help with this. Best regards, Petter Hedberg, University of Warsaw ______________________________________________ R-help at 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.
Hi. Is it possible to draw a contour plot (with contour or filled contour) or a a surface plot (with persp or persp3d) with the z axis in a log scale? Gilbert
Gilbert Brenes wrote:
Hi. Is it possible to draw a contour plot (with contour or filled contour) or a a surface plot (with persp or persp3d) with the z axis in a log scale?
At least for contour(), you can specify logarithmic breaks. Best, Uwe Ligges
Gilbert
______________________________________________ R-help at 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.
On 2/12/2009 12:04 PM, Gilbert Brenes wrote:
Hi. Is it possible to draw a contour plot (with contour or filled contour) or a a surface plot (with persp or persp3d) with the z axis in a log scale?
For persp or persp3d I think you'd have to do the log transformation
yourself. For example,
x <- 1:100
y <- 1:100
z <- outer(x,y, function(x, y) exp(x/10 + y/10)
logz <- log(z, 10)
persp3d(x,y,logz, axes=FALSE, zlab="z", col="red")
axes3d(c("x", "y"))
axis3d("z", at=pretty(logz), labels=10^pretty(logz))
Duncan Murdoch