I can convert list into data.frame with do.call function:
z=list(c(1:3),c(5:7),c(7:9))
x=as.data.frame(do.call(rbind,z))
names(x)=c("one","two","three")
x
## one two three
## 1 1 2 3
## 2 5 6 7
## 3 7 8 9
I want to make it to be more concise ,merge the two statement into one statment,can i?
x=as.data.frame(do.call(rbind,z))
names(x)=c("one","two","three")
An alternative is the
structure()function, this is in base, and more general: