# MyConcat Example # Create a function that concatenates two # vectors element by element. myConcat <- function(v, w) { len = length(v) for(i in 1:length(w)) { v[len+i] <- w[i] } return(v) } # Compare myConcat function with builtin c function. system.time(myConcat(1:30000, 1:30000)) system.time(c(1:30000, 1:30000)) # Try c function with larger arrays. system.time(c(1:900000, 1:900000))