On Tue, 15 May 2012, David L Carlson wrote:
qqmath(~ rnorm(100),
panel = function(x, ...) {
panel.qqmathline(x, ...)
panel.qqmath(x, ...)
})
David,
I have 130 plots to produce (30 chemicals un-transformed and three
transformations). The R console insists that I retype each of the 6 lines
(adding a prepanel.qqmathline line) each time. Makes more sense to put all
the commands in a script that I can run within R using "source('metals.R')".
However, R appears to not see that the first line does not terminate the
command and the following lines are continuations. The source is,
pdf('ag_norm.pdf')
qqmath(~ Ag | factor(basin), data = surfchem.cast, main = 'Silver
(Untransformed'),
prepanel = prepanel.qqmathline,
panel = function(x, ...) {
panel.qqmathline(x, ...)
panel.qqmath(x, ...)
})
dev.off()
and R returns,
source('metals.R')
Error in source("metals.R") : metals.R:4:83: unexpected ','
3: pdf('ag_norm.pdf')
4: qqmath(~ Ag | factor(basin), data = surfchem.cast, main = 'Silver
(Untransformed'),
with a caret under the last ')'.
What syntax error did I commit in the call to qqmath() above?
Rich
--
Richard B. Shepard, Ph.D. | Integrity - Credibility - Innovation
Applied Ecosystem Services, Inc. | Helping Ensure Our Clients' Futures
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
______________________________________________
[email protected] 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.