Skip to content
Prev 275407 / 398506 Next

Syntax Help for xyplot()

On Mon, 24 Oct 2011, Rich Shepard wrote:

            
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