On Mon, May 21, 2012 at 2:00 AM, peter dalgaard wrote:
[snip]
> What the poster probably wanted was something in the vein of
>
>> nm <- colnames(airquality)[1]
>> ff <- formula(bquote(.(as.name(nm))~Month))
>> aggregate(ff, airquality, mean, na.rm=T)
> Month Ozone
> 1 5 23.61538
> 2 6
On May 21, 2012, at 10:25 , Petr PIKAL wrote:
> Hi
>
> You did not provide data but I can see some problems in your code. See
> inline.
>>
>> I'm failing to get a for loop working. I'm sure it's something simple,
> and I
>> have found some posts relating to it, but I'm just not understanding
Hi
You did not provide data but I can see some problems in your code. See
inline.
>
> I'm failing to get a for loop working. I'm sure it's something simple,
and I
> have found some posts relating to it, but I'm just not understanding why
> this isn't working.
>
> I have a data frame and woul
No data, not reproducible.
I think you should be using na.omit, though.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
I'm failing to get a for loop working. I'm sure it's something simple, and I
have found some posts relating to it, but I'm just not understanding why
this isn't working.
I have a data frame and would like to loop through specific column names,
using aggregate() within a for loop. There are NA's
5 matches
Mail list logo