Re: [R] [Fwd: as.data.frame question]

From: <markleeds_at_verizon.net>
Date: Fri 07 Jul 2006 - 05:10:54 EST


>From: "Liaw, Andy" <andy_liaw@merck.com>
>Date: Thu Jul 06 13:30:23 CDT 2006
>To: markleeds@verizon.net, r-help@stat.math.ethz.ch
>Subject: RE: [R] [Fwd: as.data.frame question]

my apologies ( especially to jim holtman ). i was doing the do.call( cbind,dataframe) thing but not setting the output to anything !!! that's why i wasn't getting what i was supposed to get. uuuugh. i'm really sorry and i wopn't ask anything the rest of the day.

>What's wrong with this?
>
>> lst <- list(A=c(a=1, b=2, c=3), B=c(a=3, b=2, c=1), C=c(a=2, b=3, c=1))
>> lst
>$A
>a b c
>1 2 3
>
>$B
>a b c
>3 2 1
>
>$C
>a b c
>2 3 1
>
>> as.data.frame(lst)
> A B C
>a 1 3 2
>b 2 2 3
>c 3 1 1
>
>Andy
>
>From: markleeds@verizon.net
>>
>> >hi all : as a result of an lapply command, i get the
>> following output.
>> >
>> >
>> >$AAA
>> > 000106 000107 000108
>> > 5.5 6.5 3.0
>> >
>> >$BBB
>> > 000106 000107 000108
>> > 4 5 6
>> >
>> >$CCC
>> > 000106 000107 000108
>> > 7 8 9
>> >
>> >does someone know how to turn this output into a dataframe (
>> or matrix,
>> >that's fine also ) like the following :
>> >
>> > AAA BBB CCC
>> >
>> > 000106 5.5 4 7
>> > 000107 6.5 5 8
>> > 000108 3.0 6 9
>> >
>> >i've tried sooooo many things with no luck. thanks a lot.
>>
>> ______________________________________________
>> R-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide!
>> http://www.R-project.org/posting-guide.html
>>
>>
>
>
>------------------------------------------------------------------------------
>Notice: This e-mail message, together with any attachments...{{dropped}}



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 07 05:15:01 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 07 Jul 2006 - 06:16:10 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.