[R] Syntax Help for xyplot()
Rich Shepard
rshepard at appl-ecosys.com
Mon Oct 24 23:17:28 CEST 2011
On Mon, 24 Oct 2011, Rich Shepard wrote:
> Perhaps because it's Monday I'm not successfully writing the xyplot()
> command to show the quant, for example, for TDS by site. What I need to do
> is plot the quant values for TDS vs. Cond, TDS vs. SO4, etc.
I should have provided some of the attempts:
xyplot(quant ~ TDS | site, data = burns.tds.anal)
Error in eval(expr, envir, enclos) : object 'TDS' not found
xyplot(quant ~ 'TDS' | site, data = burns.tds.anal)
Warning messages:
1: In order(as.numeric(x)) : NAs introduced by coercion
2: In diff(as.numeric(x[ord])) : NAs introduced by coercion
3: In function (x, y, type = "p", groups = NULL, pch = if (is.null(groups))
plot.symbol$pch else superpose.symbol$pch, :
NAs introduced by coercion
This produces a plot with no data in each panel.
And I cannot see how to specify, for example, 'TDS' x 'Cond' because
xyplot('TDS'$quant ~ 'Cond'$quant | site, data = burns.tds.anal)
Error in "TDS"$quant : $ operator is invalid for atomic vectors
and
xyplot('TDS'[quant] ~ 'Cond'[quant] | site, data = burns.tds.anal)
There were 25 warnings (use warnings() to see them)
produces the panels without data in them.
Rich
More information about the R-help
mailing list