[R] Select only cases with negative values
Michael Just
mgjust at gmail.com
Sat Oct 18 23:26:02 CEST 2008
Henrique,
This code below from a R-help helper worked.
> dat <-data.frame(f)
> dat2<-dat[dat$d<0,]
> dat.lm <-lm(c~d, data=dat2)
Thanks again,
Michael Just
On Sat, Oct 18, 2008 at 5:22 PM, Henrique Dallazuanna <wwwhsd at gmail.com> wrote:
> Works for me.
>
> dat.lm <-lm(c~d, data = dat, subset=d < 0)
>
> Please see if you have dat with d and c columns names.
>
>
More information about the R-help
mailing list