0

Using a melt dataframe like this:

dframe1 <- data.frame <- data.frame(id = c(1,1,2), name = c("google", "google", "amazon"))

and a second data frame which has the same id coloumn like this:

dframe2 <- data.frame(id = c(1,2), mainnum = c(12.4, 32.1))

How is it possible to merge the two dataframes and receive this result:

data.frame <- data.frame(id = c(1,1,2), name = c("google", "google", "amazon"), mainnum = c(12.4, 12.4, 32.1))
Erik Bodg
  • 302
  • 2
  • 10

0 Answers0