[R] Joining data frames

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Wed Jun 30 04:07:16 CEST 2021


To expand on this for people submerged in tidyverse, merge is the base R swiss army knife that performs the in-memory functions of

  dplyr::inner_join
  dplyr::left_join
  dplyr::right_join
  dplyr::full_join

but it does not support databases and the like.

On June 29, 2021 5:07:46 PM PDT, Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
>On 29/06/2021 8:03 p.m., Matthew McCormack wrote:
>>       I think, but I'm not sure, that when you use merge it basically
>> attaches one data frame to the other. I do not think it matches up
>> entries from a particular column in each data frame (and I know
>> biologists frequently want to match entries from a particular column
>in
>> each data frame). For that, I think you need a join from the dplyr
>package.
>
>You think wrong.  The Description in the help page is short and clear:
>
>"Merge two data frames by common columns or row names, or do other 
>versions of database join operations."
>
>Duncan Murdoch
>
>______________________________________________
>R-help using 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.

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list