[R] Problem with cut
Henrique Dallazuanna
wwwhsd at gmail.com
Fri Feb 22 15:22:35 CET 2008
Try this:
grep("330", levels(cc), value=T)
On 22/02/2008, Jussi.Lehto at ubs.com <Jussi.Lehto at ubs.com> wrote:
> Hi All,
>
> I might misunderstood how cut works. But following behaviour surprises
> me.
>
> vv <- seq(150, 346, by= 4)
> cc <- cut(vv, 12)
> cc[vv == 330]
> Results [1] (330,346]
>
> I would have expected 330 to fall into (313,330] category.
>
> Can you please advice what do I do wrong?
>
> Many Thanks,
> Jussi Lehto
>
> Visit our website at http://www.ubs.com
>
> This message contains confidential information and is in...{{dropped:29}}
>
>
> ______________________________________________
> 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.
>
>
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
More information about the R-help
mailing list