[R] bquote in plot.default vs plot.formula ?
Bert Gunter
gunter.berton at gene.com
Fri Apr 13 19:48:12 CEST 2007
Folks:
If it's not too technical, could someone explain the following:
x <- 1:5; y <- x
## The following 3 all work as expected:
plot(x,y, main= expression(sin(x+1)))
plot(y~x, main= expression(sin(x+2 )))
plot(x,y, main= bquote(sin(x+3)))
## The following does not:
plot(y~x, main= bquote(sin(x+4)))
## Perhaps more interesting results occur if "log[10]" is substituted for
"sin" in these expressions. The last plot command then produces the error
message: "Error in log[10] : object is not subsettable"
Feel free to reply offline if you think that's more appropriate. Version
info below.
Cheers,
Bert
Bert Gunter
Genentech Nonclinical Statistics
South San Francisco, CA 94404
650-467-7374
Version info:
R.Version()
$platform
[1] "i386-pc-mingw32"
$arch
[1] "i386"
$os
[1] "mingw32"
$system
[1] "i386, mingw32"
$status
[1] ""
$major
[1] "2"
$minor
[1] "4.1"
$year
[1] "2006"
$month
[1] "12"
$day
[1] "18"
$`svn rev`
[1] "40228"
$language
[1] "R"
$version.string
[1] "R version 2.4.1 (2006-12-18)"
More information about the R-help
mailing list