Re: [R] how to create automatically names for vectors in a loop?

2010-05-28 Thread jim holtman
Before polluting your workspace with objects, look at how you might use a 'list' to collect them all together, especially if you are going to do processing on them later as a group, or if you want to easily save/load them. You could do the following: > myList <- list() > for (i in 1:10) myList[[p

Re: [R] how to create automatically names for vectors in a loop?

2010-05-27 Thread Lukas Schefczyk
3 AM To: Subject: [R] how to create automatically names for vectors in a loop? Hi, I want to generate a number of vectors and store them with different names, like this: x=1 while (x<100) { vector#x# = rnorm(100) x=x+1 } where each vector has, at its hand, instead of #x# a number which

Re: [R] how to create automatically names for vectors in a loop?

2010-05-27 Thread Erik Iverson
Zoppoli, Gabriele (NIH/NCI) [G] wrote: Hi, I want to generate a number of vectors and store them with different names, like this: x=1 while (x<100) { vector#x# = rnorm(100) x=x+1 } where each vector has, at its hand, instead of #x# a number which goes from 1 to 99. How can I do t

[R] how to create automatically names for vectors in a loop?

2010-05-27 Thread Zoppoli, Gabriele (NIH/NCI) [G]
Hi, I want to generate a number of vectors and store them with different names, like this: x=1 while (x<100) { vector#x# = rnorm(100) x=x+1 } where each vector has, at its hand, instead of #x# a number which goes from 1 to 99. How can I do this? Thanks Gabriele Zoppoli, MD Ph.D. F