[R] collapsing a list in a var.

jim holtman jholtman at gmail.com
Thu Dec 20 23:36:25 CET 2007


> my.obj<-c("a1","a2","a3")
> paste(my.obj, collapse=" ")
[1] "a1 a2 a3"


On Dec 20, 2007 5:15 PM, Milton Cezar Ribeiro <milton_ruser at yahoo.com.br> wrote:
> 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?



More information about the R-help mailing list