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
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
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
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
4 matches
Mail list logo