Dear list,
I would like to rename an object as follows:
SimLUall - matrix(c(0,1,0,0, 1,0,0,0, 0,0,1,0, 0,0,0,1),nrow=4, ncol=4)
j - 2
SimLUall2 - SimLUall and j
The value of j should be assigned automatically to SimLUall.
How can I achieve this?
Regards,
Ulrich
Ulrich Leopold wrote:
Dear list,
I would like to rename an object as follows:
SimLUall - matrix(c(0,1,0,0, 1,0,0,0, 0,0,1,0, 0,0,0,1),nrow=4, ncol=4)
j - 2
SimLUall2 - SimLUall and j
Not absolutely sure what you are going to do, I guess either
SimLUall2 - SimLUall
SimLUall - j
or
Hi Ulrich
See:
? assign and
? paste
with something like:
assign(paste(SimLUall,j,sep=),SimLUall)
Note though that if you are planning some simulations, many guRus would say
that you should use a list.
nsimul - 100
simOut - vector(mode=list,length=nsimul)
names(simOut) -
On Tue, 08 Feb 2005 11:36:29 +0100, Eric Lecoutre
[EMAIL PROTECTED] wrote :
Note though that if you are planning some simulations, many guRus would say
that you should use a list.
nsimul - 100
simOut - vector(mode=list,length=nsimul)
names(simOut) - paste(simu,1:nsimul,sep=)
for (i in