Re: [R] Object xxx not found

2011-12-07 Thread John Visagie
Thank you, Michael. This message and attachments are subject to a disclaimer. Please refer to www.it.up.ac.za/documentation/governance/disclaimer/ for full details. >>> "R. Michael Weylandt" 2011/12/07 09:27:38 PM >>> >>> " I'm not creating a sector' Exactly, but your code

Re: [R] Object xxx not found

2011-12-07 Thread Sarah Goslee
You should probably read some of the intro to R documents, as this is a critical component of using R. On Wed, Dec 7, 2011 at 7:06 AM, John Visagie wrote: > Dear All, > > I am having a very basic error, but somehow do not know how to resolve it.   > I've read a dataset in .csv into R with two col

Re: [R] Object xxx not found

2011-12-07 Thread R. Michael Weylandt
" I'm not creating a sector' Exactly, but your code (sector$exports) tells R to "find a variable called sector and then look inside of it for something called exports". It never bothers with the second part because it can't execute the first because it can't find anything called sector (as the err

Re: [R] Object xxx not found

2011-12-07 Thread Uwe Ligges
On 07.12.2011 13:06, John Visagie wrote: Dear All, I am having a very basic error, but somehow do not know how to resolve it. I've read a dataset in .csv into R with two columns - sector, export. When trying to plot the data it says "sector not found" This is the formula. SouthAfrica<-

Re: [R] Object xxx not found

2011-12-07 Thread R. Michael Weylandt
You never create a "sector" object inR so it can't be found. Perhaps you meant hist(SouthAfrica$exports) Michael On Dec 7, 2011, at 7:06 AM, "John Visagie" wrote: > Dear All, > > I am having a very basic error, but somehow do not know how to resolve it. > I've read a dataset in .csv into

[R] Object xxx not found

2011-12-07 Thread John Visagie
Dear All, I am having a very basic error, but somehow do not know how to resolve it. I've read a dataset in .csv into R with two columns - sector, export. When trying to plot the data it says "sector not found" This is the formula. SouthAfrica<-read.csv(c,header=T) > hist(sector$exports,

Re: [R] object 'xxx' not found

2010-02-08 Thread Rolf Turner
On 9/02/2010, at 12:51 PM, Daniel Malter wrote: > The for loop tries to write into an object that does not yet exist. Do > month.observed=NULL prior to the loop. Bad advice. As Duncan Murdoch just pointed out, this is inefficient. Compare: > x <- NULL > system.time(for(i in 1:5) x[i] <- 42

Re: [R] object 'xxx' not found

2010-02-08 Thread Daniel Malter
-project.org] On Behalf Of emorway Sent: Monday, February 08, 2010 6:38 PM To: r-help@r-project.org Subject: [R] object 'xxx' not found The following line of code seems fairly straight forward, yet it is kicking back an error message: for (i in 1:length(mean.natveg.frac)){month.observed[i]=as.num

Re: [R] object 'xxx' not found

2010-02-08 Thread Duncan Murdoch
emorway wrote: The following line of code seems fairly straight forward, yet it is kicking back an error message: for (i in 1:length(mean.natveg.frac)){month.observed[i]=as.numeric(names(mean.natveg.frac[i]))%%12} Error message: Error in month.observed[i] = as numeric(names(mean.natveg.frac[i])

[R] object 'xxx' not found

2010-02-08 Thread emorway
The following line of code seems fairly straight forward, yet it is kicking back an error message: for (i in 1:length(mean.natveg.frac)){month.observed[i]=as.numeric(names(mean.natveg.frac[i]))%%12} Error message: Error in month.observed[i] = as numeric(names(mean.natveg.frac[i]))%%12 : object '