On Wed, Dec 10, 2008 at 6:39 PM, Bert Gunter wrote:
> ...?tapply says that the first argument is an **atomic** vector. A factor
> is not an atomic vector. So tapply interprets it as such by looking only at
> its representation, which is as integer values.
>
What is the rationale for this? If it
dear Hadley and Bert,
thank you very much for your suggestions. I asked one question and I
learned 2 things:
1. Hadley,
library(plyr)
ddply(data, .(V1), colwise(cl))
that is exactly what I was searching for.
2. Bert,
> ?tapply says that the first argument is an **atomic** vector. A
> factor is
> Perhaps... But plyr works only on **basic** data structures, and I referred
> to all **possible** data strucures (deliberately); so I stand by my
> statement and note that you did not contradict it.
To me the basic structures are vectors, matrices and arrays; lists;
and data frames (that these a
Behalf Of hadley wickham
Sent: Wednesday, December 10, 2008 3:52 PM
To: Bert Gunter
Cc: r-help@r-project.org
Subject: Re: [R] repeated searching of no-missing values
> graphics,statistical analysis etc. as well as programming. There are just
> too many possible data structures to expect l
> graphics,statistical analysis etc. as well as programming. There are just
> too many possible data structures to expect logical consistency in their
> handling throughout (if one can even define what that means in specific
> instances!).
I disagree with this claim: I think it is possible to crea
On Wed, Dec 10, 2008 at 4:09 PM, Patrizio Frederic
<[EMAIL PROTECTED]> wrote:
> hi all,
> I have a data frame such as:
>
> 1 blue 0.3
> 1 NA0.4
> 1 red NA
> 2 blue NA
> 2 green NA
> 2 blue NA
> 3 red 0.5
> 3 blue NA
> 3 NA1.1
>
> I wish to find the last non-missing value in every 3p
ber 10, 2008 2:09 PM
To: r-help@r-project.org
Subject: [R] repeated searching of no-missing values
hi all,
I have a data frame such as:
1 blue 0.3
1 NA0.4
1 red NA
2 blue NA
2 green NA
2 blue NA
3 red 0.5
3 blue NA
3 NA1.1
I wish to find the last non-missing value in every 3ple
hi all,
I have a data frame such as:
1 blue 0.3
1 NA0.4
1 red NA
2 blue NA
2 green NA
2 blue NA
3 red 0.5
3 blue NA
3 NA1.1
I wish to find the last non-missing value in every 3ple: ie I want a 3
by 3 data.frame such as:
1 red 0.4
2 blue NA
3 blue 1.1
I have written a little
8 matches
Mail list logo