Hi,
I would like to read several datasets and would like to create a set
(list? sequence?) of many empty dataframes. How could this be done? How
could I declare a set (list? sequence?) of many empty matrices?
Thanks,
Miao
[[alternative HTML version deleted]]
Hello,
I can't say I understand the question, but if you want a list of empty
dfs and a list of empty matrices, the following will do.
replicate(10, data.frame())
replicate(10, matrix(NA, nrow = 0, ncol = 0))
Hope this helps,
Rui Barradas
Em 03-05-2013 16:20, jpm miao escreveu:
Hi,
Hi,
I am not sure about what you meant.
lapply(1:5,function(i) data.frame())
[[1]]
data frame with 0 columns and 0 rows
[[2]]
data frame with 0 columns and 0 rows
[[3]]
data frame with 0 columns and 0 rows
[[4]]
data frame with 0 columns and 0 rows
[[5]]
data frame with 0 columns and 0
3 matches
Mail list logo