Re: [R] how to use different variable to store values with different length in a loop

2008-01-18 Thread jim holtman
I would recommend that you use a "list" instead of creating the variables. Here is how you might do a list: # preallocate the list myList <- vector('list', 100) for (i in 1:100){ .you calculations. myList[[i]] <- result } If you really want to create 100 variables, then use 'assi

[R] how to use different variable to store values with different length in a loop

2008-01-18 Thread Jack Luo
Hi, List I am trying to use variables named A1, A2, ..., A100 to store some values, each variable could store some values with different length, how can I achieve this? Thanks, Jack [[alternative HTML version deleted]] __ R-help@r-project.org