Quantcast
Channel: merge table in R - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Ricardo Saporta for merge table in R

You are looking for merge merge(table1, table2, by.x=c("subj", "gamble"), by.y=c("subj2", "gamble2"), all=FALSE, sort=TRUE)edited as per Ananda's helpful observation

View Article



merge table in R

I have the 2 tables as below subj <- c(1, 1, 1, 2, 2, 2, 3, 3, 3)gamble <- c(1, 2, 3, 1, 2, 3, 1, 2, 3)ev <- c(4, 5, 6, 4, 5, 6, 4, 5, 6)table1 <- data.frame(subj, gamble, ev)subj2 <-...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images