[R] Lattice: problem using panel.superpose and panel.groups

Dieter Menne dieter.menne at menne-biomed.de
Sat Aug 16 10:14:36 CEST 2008


Michael Braun <braunm <at> MIT.EDU> writes:

> 
> I have some data that is split into two groups:  some "actual" data,  
> and some simulated data, generated from several different models.  The  
> actual data come from two different datasets (calibration and  
> holdout), and the simulations were calibrated on each data set under  
> the various models.
> 
> What I want to do is create a boxplot on the simulated data, and  
> superimpose a line representing the actual data.  This plot would  
> condition on dataset and model.  While the simulated data various  
> across model and dataset, the actual data varies only across dataset  
> and is common for all models.
> 
Michael,

to understand you problem, I started creating a data set that simulates the
data, but I got stuck with with your intended meaning of "groups.

df =    data.frame(p=rnorm(100),count=rpois(100,5),dataset=c("A","B"),
  model=rep(c("M1","M2"),each=50),groups= dont' know)

Could you please (as the posting guide says) supply a self-running example that
shows the problem? 

You named your data.frame "data.frame"; it could work, but better don't use
common things like "c" or "data.frame" as variable name. 

Dieter



More information about the R-help mailing list