I have 2 data frames (A & B) with some common column names. A has 10 rows. B has 20 rows.
How do I combine them so I end up with a data frame with 30 rows that only contains the common columns. I was trying 'merge' (Merge two data frames by common columns .....etc. ) but that is not giving me what I expect... > a <- iris > b <- iris > > c <-merge(a,b) > > NROW(a) [1] 150 > NROW(c) [1] 152 Why is there only 152 rows and not 300? -- View this message in context: http://r.789695.n4.nabble.com/how-to-stack-data-frames-tp2306284p2306284.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list 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.