[R] Print the content of several columns in only one

zoe.cryocla zoe.cryocla at gmail.com
Wed May 25 10:02:02 CEST 2011


Hi,

I’m an R beginner and I'd really appreciate an hand…
I'd like to create a new column in a dataframe in wich will be print the
content of several other columns. 

For instance :
I’ve got 2 columns : "site" – "sampling number" and I would like to create a
third column "ID", in wich will appear both the site name and the sampling
number, like :

"site"   "sampling"   "ID"
site1   1                site1.1
site1   2                site1.2
site2   1                site2.1
site3   1                site3.1

How could I do that in R? If someone could help me it'd be great, thanks in
advance !

Zoé

--
View this message in context: http://r.789695.n4.nabble.com/Print-the-content-of-several-columns-in-only-one-tp3549114p3549114.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list