Hello,

is't possible to specify pattern in levels ?

> y=c("ff","f","m","mm","fm","mf","ffm","mmf","mmm","fff");
> factor(y)
 [1] ff  f   m   mm  fm  mf  ffm mmf mmm fff
Levels: f ff fff ffm fm m mf mm mmf mmm

I want to specify levels using regexp ("f.*","m.*") or use some
another method. So, I could have 2 levels, say, F and M, where
F means everything  beginning from 'f' and M - from 'm'.

Something like cut() for numerical data.

        Regards,
                Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to