It's easy to repeat a data.frame once,
mt2 <- rbind(mtcars, mtcars)
But what's an R-like way to do this generally? If I want 10 copies of mtcars
together I could
mt10 <- mtcars
for (i in 2:10) mt10 <- rbind(mt10, mtcars)
which is plenty concise, but seems not in the spirit of R. Is there a better way to do this, or a clever trick using vector recycling?