[R] a new df with one combined column

Ulrik Stervbo ulrik.stervbo at gmail.com
Wed Jun 29 16:08:19 CEST 2016


Then I don't understand what you want to achieve. If you want to combine
the two columns you can do

c(df1$col1,  df2$col2)

Ulrik

<chalabi.elahe at yahoo.de> schrieb am Mi., 29. Juni 2016 15:45:

> Hi Ulrik,
> Thnaks for your reply, merge() does not give me one column, it returns two
> columns
>
>
> On Wednesday, June 29, 2016 3:35 PM, Ulrik Stervbo <
> ulrik.stervbo at gmail.com> wrote:
>
>
>
> 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:
>
> Hi all,
> >I have this column as a part of df:
> >
> >    $License :   Factor W/384 levels
> "41005","41006","41034","41097","41200",...
> >and I have other column which is a part of other df lets say df2:
> >
> >    $Diff    :   int  41166 41202 41290 41353 41503 41507 41548
> >these two columns df$License and df$Diff have different dimensions and I
> want to make a new df that is combinations of both i.e. I want a column
> which has both of these columns together as one column, but I don't know
> how to bring these two column in one as a new df. Does anyone know how
> should I do that?
> >Thanks for any help,
> >Elahe
> >
> >______________________________________________
> >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.
> >
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list