[R] wrong with using subset

Duncan Murdoch murdoch at stats.uwo.ca
Wed Jan 13 16:57:35 CET 2010


On 13/01/2010 10:45 AM, Don MacQueen wrote:
> I would suggest that first you look at the results of
>
>    (as.numeric(as.character(dfpr2_r$pr2))) > 0.2 && (dfpr2_r$landa > 10)
>
> by itself. Does it give all FALSE ?
>   

I'd guess the problem is using && instead of &. 

Duncan Murdoch
> Then look at each of the parts separately. What are the results of
>
>     (as.numeric(as.character(dfpr2_r$pr2))) > 0.2
> and
>     dfpr2_r$landa > 10
>
> Are there any TRUE among the results?
>
> Does
>     as.numeric(as.character(dfpr2_r$pr2))
> give what you expect?
>
> -Don
>
> At 5:20 PM +0200 1/13/10, Ahmet Temiz wrote:
> >hello
> >
> >is it wrong with this expression:
> >
> >subset(dfpr2_r,(as.numeric(as.character(dfpr2_r$pr2))) > 0.2 && (dfpr2_r$landa
> >>  10))
> >
> >it gives nothing
> >
> >regards
> >--
> >Open WebMail Project (http://*openwebmail.org)
> >
> >
> >--
> >This message has been scanned for viruses and
> >dangerous content by MailScanner, and is
> >believed to be clean.
> >
> >______________________________________________
> >R-help at r-project.org mailing list
> >https://*stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide http://*www.*R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
>
>



More information about the R-help mailing list