0

This is what I wanted to do

so I am trying to merge these dataframe, therefore as a table with name / proportion / degree_length

but the condition is that I will only use the rows which they share same name.

How should I code this? Thank you

thelatemail
  • 91,185
  • 12
  • 128
  • 188
  • `merge(dat1, dat2, by = "name")` – r2evans Feb 24 '21 at 05:51
  • Your use of images to display what you are hoping for is very clear and demonstrative, so I think my previous comment will be enough. If not, though, however clear your images are, they are just images, and you may find a negative reaction by many (for good reasons, https://meta.stackoverflow.com/a/285557). A better strategy is to include a sample of both frames and the expected output, all via an unambiguous data sample such as the output from `dput`; see https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info. Thanks! – r2evans Feb 24 '21 at 05:53
  • Welcome to SO, Young Jun Jeong! – r2evans Feb 24 '21 at 05:53
  • 1
    Thank you so much r2evans! Sorry I'm new to stackoverflow so didn't know about the rules – Young Jun Jeong Feb 24 '21 at 06:03

0 Answers0