I want a command (last line) that can return a matrix. I'm wondering if there is a way to do so. g<-function(x) { c(x,x) } lapply(1:10,g) sapply(1:10,g) sapply(paste(1:10, 1:10), strsplit, split=' ')# I want a command that returns a matrix