[R] factors levels ?

jombart at biomserv.univ-lyon1.fr jombart at biomserv.univ-lyon1.fr
Tue Nov 13 14:42:35 CET 2007


Hi,
see ?cut

?pretty can also help to define "boundaries".

Regards,

Thibaut.

> Hi,
>
> It's just some example code.. The application is uninteresting. I am
> searching for some functionality.
>
> X <- rnorm(100) //my data
>
> Y <- seq(-3,3,by=0.1) // bin boundaries.
>
> Now I would like to generate a - list of factors,  length as X...
> i.e.: all values in the range [-3,-2.9) have the same factor... [-3,-2.9)
> etc.
>
> I would assume R has such a function but I cant recall which one it is.
>
>
> --
> W. Eryk Wolski
>
> ______________________________________________
> 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