[R] Help with "For" instruction
sarah.goslee at gmail.com
Tue Jan 4 19:12:13 CET 2011
You need to swap the get and paste commands -
paste() creates the string filename that get() acts on.
As already explained, using a list is much nicer.
2011/1/4 André Dias <diasandre at gmail.com>:
> I was doing
> for (i in 1:length(database))
> assign(paste("distancematrix",i,sep=""), dist(paste(get("database", i,
> but i really did not know what I was doing. I will try your way. But I still
> don't understnad how the get function works.
> What woud be more r-ish then get() ?
More information about the R-help