Re: [R] Cannot subset a specific mean from this function

2015-12-18 Thread Bradley Wolf
David, I withdrew from the class because I couldn't understand it. Apologies. I shall ask no more questions. Brad On Fri, Dec 18, 2015 at 3:28 PM, David Winsemius wrote: > > > On Dec 18, 2015, at 7:23 AM, Bradley Wolf wrote: > > > > Jim, > > Thank you for your response. I am not asking you

Re: [R] Cannot subset a specific mean from this function

2015-12-18 Thread David Winsemius
> On Dec 18, 2015, at 7:23 AM, Bradley Wolf wrote: > > Jim, > Thank you for your response. I am not asking you for you to do my work. > I am really new to programming (in any context) and really haven't gotten > the grasp of the logic yet. I have used R before but in the context of R > Command

Re: [R] Cannot subset a specific mean from this function

2015-12-18 Thread Bradley Wolf
Jim, Thank you for your response. I am not asking you for you to do my work. I am really new to programming (in any context) and really haven't gotten the grasp of the logic yet. I have used R before but in the context of R Commander and am trying this so I can be a more robust user. That being

Re: [R] Cannot subset a specific mean from this function

2015-12-17 Thread Jim Lemon
Hi Bradley, I think I can see one or two reasons why you are getting creamed. First, pollutantmean is a function, and there is no method for taking the mean of a function. Second, nitrate is unlikely to be an extractable element of pollutantmean given the above code (that's the error). I suspect

[R] Cannot subset a specific mean from this function

2015-12-17 Thread Bradley Wolf
HI, I am very new to R (and programming in general) and am taking a class in it now. I am getting creamed. I want the last part of the function statement below to give me the mean of the data set of nitrates. When I do it I get an error statement stating: Error in pollutantmean$nitrate : objec