Re: [R] export list to csv

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Wed, 16 Mar 2011 12:03:24 -0300

Use dput:

dput(l, file = "l_str.txt")

Then, to read again:

l <- dget(file = 'l_str.txt')

On Wed, Mar 16, 2011 at 11:55 AM, andrija djurovic <djandrija_at_gmail.com> wrote:
> Hi everybody.
>
> I have list like this:
>
> l<-list(data.frame(q1=c(1,2,"check"),q2=c(3,"check",5)),
> data.frame(q1=c("check",1),q2=c(4,5)))
> names(l)<-c("A","B")
> rownames(l[[1]])<-c("aa","bb","cc")
> rownames(l[[2]])<-c("aa","bb")
>
> Every object has the same number of columns but different number of rows.
> Does anyone know if it is possible to export such kind of list, into one csv
> file, and  keeping all the names?
>
> Thanks in advance
>
> Andrija
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 16 Mar 2011 - 15:10:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 16 Mar 2011 - 15:30:21 GMT.

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

list of date sections of archive