How to merge vectors into a list in R? -


what is:

 > list("",rep(0,2))  [[1]]  [1] ""   [[2]]  [1] 0 0 

but expect this:

 [[1]]  [1] ""   [[2]]  [1] 0   [[3]]  [1] 0 

does know how merged result? thanks!

you want:

c(list(""),rep(0,2)) 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -