[R] tapply, levelinformation

2007-02-15 Thread Antje
Hello, I have another question. I would like to plot something within a self written function (plotdensity) called by tapply t <- tapply(mat, classes, plotdensity) Now I would like to add each plot the class/level as title. How can I do this? Antje

Re: [R] tapply, levelinformation

2007-02-16 Thread niederlein-rstat
Hi Jim, jim holtman schrieb: > Here is one way: > > t <- split(mat, classes) > for (i in names(t)) plotdensity(t[[i]], main=i) > But then I don't use the advantages of the tapply anymore... > What is the problem you are trying to solve? I have a set of data (multiple files), which belong to

Re: [R] tapply, levelinformation

2007-02-16 Thread Antje
Hi Jim, jim holtman schrieb: > Here is one way: > > t <- split(mat, classes) > for (i in names(t)) plotdensity(t[[i]], main=i) > But then I don't use the advantages of the tapply anymore... > What is the problem you are trying to solve? I have a set of data (multiple files), which belong to

Re: [R] tapply, levelinformation

2007-02-16 Thread jim holtman
But it does the same thing. What 'advantage' of tapply do you think that you are missing? Performance is probably not impacted since most of the time is in the plot. On 2/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi Jim, > > jim holtman schrieb: > > Here is one way: > > > > t <- sp