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))