[R] add repeated rows in data frame (without a loop)

Nicolas Gutierrez nicolasg at uw.edu
Wed Feb 23 08:11:37 CET 2011


That worked.. thanks Peter

On 2/22/2011 5:40 PM, Peter Ehlers wrote:
>   popm <- as.matrix(pop)
>   recm <- matrix(rep(rec, n), nr=n, byrow=TRUE)
>   newpop <- data.frame(rbind(popm, recm))



More information about the R-help mailing list