[R] convert numeric variables to factor

Bert Gunter bgunter@4567 @end|ng |rom gm@||@com
Mon Apr 9 19:00:25 CEST 2018


Just cast it!

?factor
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Mon, Apr 9, 2018 at 9:28 AM, Saif Tauheed <saif.tauheed using gmail.com> wrote:
> Dear Sir,
>
> I have xlsx data set which I have imported to R studio. Now some of the variables are defined as numeric but I want define them as factor variable so that I run classification algorithm in R.
>
> Please to covert the variables.
>
> Thanks and Regards
>
> Abu Afzal
> PhD Eco
> JNU
> India
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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