Hello R-community, I want to generate stacked density plots in lattice. My data consist of a numeric variable ('pid') that is measured in different individuals ('id'), which can be divided in two types ('type') and the measurements were repeated a different time points ('day'). I read in the Lattice book that this can be done using the 'flowViz' package, so I tried to reproduce the example given in there and obtained an error: library('flowViz') data(GvHD, package='flowCore") densityplot(Visit~'FSC-H'|Patient, data=GvHD) Error: ' "FSC-H" ' is/are no valid parameter(s) in this frame I am not sure if I am missing something. I was hoping to apply something similar to my data, maybe like this? desityplot(id~pid|type+day, data=mydata) Thank you in advance for your help, Judith
On Apr 10, 2009, at 4:53 PM, Judith Flores wrote:> > Hello R-community, > > I want to generate stacked density plots in lattice. My data > consist of a numeric variable ('pid') that is measured in different > individuals ('id'), which can be divided in two types ('type') and > the measurements were repeated a different time points ('day'). > > I read in the Lattice book that this can be done using the 'flowViz' > package, so I tried to reproduce the example given in there and > obtained an error: > > library('flowViz') > data(GvHD, package='flowCore") > densityplot(Visit~'FSC-H'|Patient, data=GvHD) > > Error: ' "FSC-H" ' is/are no valid parameter(s) in this frame > > I am not sure if I am missing something.You are missing the fact that back-quotes are not the same as single- quotes. This should be successful: densityplot(Visit~`FSC-H`|Patient, data=GvHD) # rather an attractive graph (You are also posting a question about a Bioconductor package to the wrong list. )> I was hoping to apply something similar to my data, maybe like this? > > desityplot(id~pid|type+day, data=mydata) > > Thank you in advance for your help, >David Winsemius, MD Heritage Laboratories West Hartford, CT
On Fri, Apr 10, 2009 at 1:53 PM, Judith Flores <juryef at yahoo.com> wrote:> > Hello R-community, > > ? ?I want to generate stacked density plots in lattice. My data consist of a numeric variable ('pid') that is measured in different individuals ('id'), which can be divided in two types ('type') and the measurements were repeated a different time points ('day'). > > I read in the Lattice book that this can be done using the 'flowViz' package, so I tried to reproduce the example given in there and obtained an error: > > library('flowViz') > data(GvHD, package='flowCore") > densityplot(Visit~'FSC-H'|Patient, data=GvHD) > > Error: ' "FSC-H" ' is/are no valid parameter(s) in this frame > > ? ?I am not sure if I am missing something. I was hoping to apply something similar to my data, maybe like this? > > desityplot(id~pid|type+day, data=mydata)Try: demo("panel", package = "lattice") file.show(system.file("demo/panel.R", package = "lattice")) -Deepayan