[R] convert a list to a data frame

Bert Gunter gunter.berton at gene.com
Wed Apr 4 19:03:00 CEST 2012


??? What is a?

?str

str(a)

?do.call


On Wed, Apr 4, 2012 at 9:34 AM, Sam Steingold <sds at gnu.org> wrote:
> sorry, google does give a good start.
>
>> Google on "R convert list to data frame".
>
>  as.data.frame(do.call("rbind",a))
>
> returns an object which I don't understand.
>> summary(f)
>  name.Length  name.Class  name.Mode    status
>  1          -none-     character    Length:4445
>  1          -none-     character    Class :character
>  1          -none-     character    Mode  :character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  1          -none-     character
>  vectors.Length  vectors.Class  vectors.Mode
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  0       -none-  list
>  [ reached getOption("max.print") -- omitted 4412 rows ]]
>
> this is not a data frame I am used to.
>
> why do f$v and f$ve return the same as f$vectors?!
>
>
>
>
> --
> Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
> http://www.childpsy.net/ http://camera.org http://openvotingconsortium.org
> http://dhimmi.com http://iris.org.il http://thereligionofpeace.com
> There are two ways to write error-free programs; only the third one works.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm



More information about the R-help mailing list