[R] Declare a set (list?) of many dataframes or matrices

Rui Barradas ruipbarradas at sapo.pt
Fri May 3 17:51:47 CEST 2013


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,
>
>     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]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list