[R] apply --> data.frame

Sam Steingold sds at gnu.org
Thu Aug 30 14:56:17 CEST 2012


Is there a way for an apply-type function to return a data frame?
the closest thing I think of is

  foo <- as.data.frame(sapply(...))
  names(foo) <- c(....)

is there a more "elegant" way?
Thanks!
-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://palestinefacts.org http://dhimmi.com
http://honestreporting.com http://ffii.org http://mideasttruth.com
Lisp: it's here to save your butt.



More information about the R-help mailing list