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 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 rather than a > data frame, tranforming my factors into numerics and making the results > useless. > > Is there a way of forcing apply() to return a data frame rather than a > matrix? > > Cheers, > > Federico > > > -- > Federico C. F. Calboli > Department of Epidemiology and Public Health > Imperial College, St Mary's Campus > Norfolk Place, London W2 1PG > > Tel +44 (0)20 7594 1602 Fax (+44) 020 7594 3193 > > f.calboli [.a.t] imperial.ac.uk > f.calboli [.a.t] gmail.com > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
