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...
On Sat, Jan 28, 2012 at 10:25:47AM -0800, Melrose2012 wrote:
> Hi Again,
>
> I am writing a 'for loop' to create a matrix of randomly sampled colors.
> I've written this loop in matlab and it works fine. I then tried to do it
> in R and apparently there is something wrong with my syntax b/c ever
Hello,
>
> Every time the loop blows up, I get back this error:
>
> Error in table.combos[i, ] <- table(combos) :
> number of items to replace is not a multiple of replacement length
>
This is because not all colors are present in that one sample that breaks
the code.
>
> There is no appar
6 matches
Mail list logo