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. Sarah 2011/1/4 André Dias <diasan...@gmail.com>: > Hi > > I was doing > > for (i in 1:length(database)) > assign(paste("distancematrix",i,sep=""), dist(paste(get("database", i, > sep=""))))) > > 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() ? > > thanks > ADias > -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.