Message-ID: <1350998009549-4647132.post@n4.nabble.com>
Date: 2012-10-23T13:13:29Z
From: brunosm
Subject: Join data frame columns
In-Reply-To: <50869402.7010908@u-bourgogne.fr>
Hi Ivan, thanks for your help!
For example:
> df
num letters
1 1 A
2 2 B
3 3 C
4 4 D
5 5 E
What i want is to join "num" and "letters" in a single column. Something
like this
> new_df
1 1
2 2
3 3
4 4
5 5
6 A
7 B
8 C
9 D
10 E
I tried to do it with a list but it converts factors to numbers...
> new_df<-list(c(df[,1],df[,2]))
> new_df
[[1]]
[1] 1 2 3 4 5 1 2 3 4 5
Thanks!
--
View this message in context: http://r.789695.n4.nabble.com/Join-data-frame-columns-tp4647113p4647132.html
Sent from the R help mailing list archive at Nabble.com.