Re: [R] forcing apply() to return data frame

2006-04-21 Thread Fredrik Karlsson
Hi, There is a frameApply fynction in the library gdata from the gregmisc package. The manual says it is like the function 'by', but returns a data.frame. Maybe this is something for you? /Fredrik 2006/4/21, Federico Calboli <[EMAIL PROTECTED]>: > Hi All, > > I am (almost) successfully using

Re: [R] forcing apply() to return data frame

2006-04-21 Thread Marc Schwartz (via MN)
On Fri, 2006-04-21 at 07:37 -0700, Thomas Lumley wrote: > On Fri, 21 Apr 2006, Federico Calboli wrote: > > > Hi All, > > > > I am (almost) successfully using apply() to apply a function recursively > > on a data matrix. The function is question is as.genotype() from the > > library 'genetics' > >

Re: [R] forcing apply() to return data frame

2006-04-21 Thread Thomas Lumley
On Fri, 21 Apr 2006, Federico Calboli wrote: > Hi All, > > I am (almost) successfully using apply() to apply a function recursively > on a data matrix. The function is question is as.genotype() from the > library 'genetics' > > apply(subset(chr1, names$breed == 'lab'),2,as.genotype,sep ="") > > Un

[R] forcing apply() to return data frame

2006-04-21 Thread Federico Calboli
Hi All, I am (almost) successfully using apply() to apply a function recursively on a data matrix. The function is question is as.genotype() from the library 'genetics' apply(subset(chr1, names$breed == 'lab'),2,as.genotype,sep ="") Unfortuantely apply puts it's results into a matrix object ra