Re: [R] looping with paste

2011-08-26 Thread Juta Kawalerowicz
rg Subject: Re: [R] looping with paste As Sarah has said, you probably don't need to use "paste()" at all. However if "command" is a text string containing a (syntactically correct) R command you can execute it via eval(parse(text=command)) E.g.: command <-

Re: [R] looping with paste

2011-08-22 Thread Rolf Turner
As Sarah has said, you probably don't need to use "paste()" at all. However if "command" is a text string containing a (syntactically correct) R command you can execute it via eval(parse(text=command)) E.g.: command <- "x <- 42" eval(parse(text=command)) x [1] 42 I find t

Re: [R] looping with paste

2011-08-22 Thread Sarah Goslee
Juta, On Mon, Aug 22, 2011 at 4:29 PM, Juta Kawalerowicz wrote: > Dear list, > > I have a spacialPolygonDataFrame where variables were unnecessarily imported > as factors. So I am trying to unfactor variables from > spatialPolygonDataFrame@data with a loop > > > for (i in (1:length(names( spati