[R] write .table

John Kane jrkrideau at yahoo.ca
Wed Aug 6 16:10:51 CEST 2008


Yes.  See the append option in write.table.  This is okay for outputing results but you will not be able to use the data in R. 


--- On Tue, 8/5/08, Rajasekaramya <ramya.victory at gmail.com> wrote:

> From: Rajasekaramya <ramya.victory at gmail.com>
> Subject: [R]  write .table
> To: r-help at r-project.org
> Received: Tuesday, August 5, 2008, 6:19 PM
> hi there
> 
> Can i write two objects in one file.
> one is a list and another is a vector.
> 
> The vector here is the names of the list.so can i write
> 
> for(i in 1:60) # i have 60 list elements.
> {
> write.table(names(mylist[[i]],mylist[[i]],filename=test.txt,sep="\t",append=TRUE)
> }
> my testfile.txt should have
> 
> $listname1
> v1       V2   V3
> abc    123   lmo
> 
> $listname2
> V1   V2    V3
> abr  904   egt
> errr  604 gfd
> ext  670  rdf
> 
> Kindly help me
> 
> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/write-.table-tp18841055p18841055.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.


      __________________________________________________________________
[[elided Yahoo spam]]



More information about the R-help mailing list