[R] collapsing a list in a var.

Peter Alspach PAlspach at hortresearch.co.nz
Thu Dec 20 23:23:38 CET 2007


?sep

paste(my.obj, collapse=" ") 

HTH ......

Peter Alspach


> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Milton 
> Cezar Ribeiro
> Sent: Friday, 21 December 2007 11:15 a.m.
> To: R-help
> Subject: [R] collapsing a list in a var.
> 
> Dear all,
> 
> I have a object like my.obj<-c("a1","a2","a3") and I would 
> like my.new.obj="a1 a2 a3".
> I tryed to do my.new.obj<-paste(my.obj,sep=" ") but it return 
> three entries and I need only one entry as result.
> 
> Any idea?
> 
> Miltinho
> Brazil.
> 
> 
> 
>  para armazenamento!
> 
> 	[[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.
> 

The contents of this e-mail are privileged and/or confidential to the named
 recipient and are not to be used by any other person and/or organisation.
 If you have received this e-mail in error, please notify the sender and delete
 all material pertaining to this e-mail.



More information about the R-help mailing list