Skip to content
Prev 362122 / 398503 Next

a new df with one combined column

It looks like License was imported as character data and converted to a factor. I'm not sure I understand what you want, but to make them into a single column, you need to convert the factor back to numeric using as.numeric(as.character(License)), but you use the command levels(License) to look at the 384 values in License to be sure there are no non-numeric characters, e.g. 41,001. I there are, you will have to remove them.
Factor w/ 25 levels "40822","41172",..: 19 21 6 17 12 10 16 3 13 14 ...
int [1:25] 45142 43901 49055 44468 48356 47372 48105 43878 46846 40039 ...
num [1:50] 49148 49369 42860 48301 46414 ...
[1] 49148 49369 42860 48301 46414 45188 47361 41345 46564 47044 44572 47183 49335 42550
[15] 44616 49386 49766 41172 44741 45592 49022 41384 49867 49444 40822 45142 43901 49055
[29] 44468 48356 47372 48105 43878 46846 40039 48320 40073 42074 49054 46109 43789 44350
[43] 40373 49717 44309 49556 48858 46385 49687 46173


-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352




-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Ulrik Stervbo
Sent: Wednesday, June 29, 2016 8:35 AM
To: chalabi.elahe at yahoo.de; R-help Mailing List
Subject: Re: [R] a new df with one combined column

It looks like the function you are searching for is merge()

HTH
Ulrik

On Wed, 29 Jun 2016 at 15:11 ch.elahe via R-help <r-help at r-project.org>
wrote:
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.