On Tue, Jan 20, 2009 at 10:34 AM, Simon Pickett wrote:
> Hi all,
>
> How would you create a list of data.frames within a loop, then bind all the
> elements of the list using rbind?
>
> take this example of matrices with differing numbers of rows
>
> for(i in 1:3){
> assign(paste("s",i, sep=""),mat
Try this also:
lapply(1:3, matrix, data = NA, ncol = 3, byrow = F, dimnames = NULL)
do.call(rbind, lapply(1:3, matrix, data = NA, ncol = 3, byrow = F, dimnames
= NULL))
On Tue, Jan 20, 2009 at 2:34 PM, Simon Pickett wrote:
> Hi all,
>
> How would you create a list of data.frames within a loop, t
On 1/20/2009 11:34 AM, Simon Pickett wrote:
> Hi all,
>
> How would you create a list of data.frames within a loop, then bind all
> the elements of the list using rbind?
>
> take this example of matrices with differing numbers of rows
>
> for(i in 1:3){
> assign(paste("s",i, sep=""),matrix(data
Hi all,
How would you create a list of data.frames within a loop, then bind all the
elements of the list using rbind?
take this example of matrices with differing numbers of rows
for(i in 1:3){
assign(paste("s",i, sep=""),matrix(data = NA, nrow = i, ncol = 3, byrow =
FALSE, dimnames = NULL))
4 matches
Mail list logo