[R] Problem with cut
Heinz Tuechler
tuechler at gmx.at
Fri Feb 22 16:27:20 CET 2008
At 15:22 22.02.2008, Henrique Dallazuanna wrote:
>Try this:
>
>grep("330", levels(cc), value=T)
Could you please explain in a little more detail,
how this answers the original question?
"I would have expected 330 to fall into (313,330] category.
Can you please advice what do I do wrong?"
Thank you
Heinz
>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
>
>______________________________________________
>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