[R] covert categoral data into number

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Sun Jun 13 09:06:54 CEST 2021

factor( DF$numbers
      , levels=1:4
      , labels=c( "bottom", "middle", "high" , "top" )

On June 12, 2021 8:24:31 AM PDT, Jxay Ljj <ljjjxay using gmail.com> wrote:
>I would like to convert numbers into different categorical levels . For
>In one of column of a dataframe, there are numbers: 1,2,3, 4. How can I
>cover them into "bottom", "middle", "high" , "top" in R codes?
>	[[alternative HTML version deleted]]
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

Sent from my phone. Please excuse my brevity.

More information about the R-help mailing list