if expects just one condition (no vectors); see ?ifelse
dataframe$thevector <- ifelse(dataframe$factor=="3", a.mean,
dataframe$thevector)
K
On Wed, Oct 1, 2008 at 12:05 PM, Whitt Kilburn <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I apologize for a terribly simple question. I'm used to using
Hello all,
I apologize for a terribly simple question. I'm used to using Stata and am
trying to `switch' over to R.
I would like to recode a vector in a data frame when the value of it meets the
following condition: if (dataframe$factor=='3'){dataframe$thevector<-(an
arithmetic mean). Wh
2 matches
Mail list logo