Re: [R] covert categoral data into number

2021-06-13 Thread Avi Gross via R-help
lar expressions. -----Original Message----- From: R-help On Behalf Of Jxay Ljj Sent: Saturday, June 12, 2021 11:25 AM To: r-help@r-project.org Subject: [R] covert categoral data into number Hi I would like to convert numbers into different categorical levels . For example, In

Re: [R] covert categoral data into number

2021-06-13 Thread Jeff Newmiller
factor( DF$numbers , levels=1:4 , labels=c( "bottom", "middle", "high" , "top" ) ) On June 12, 2021 8:24:31 AM PDT, Jxay Ljj wrote: >Hi > >I would like to convert numbers into different categorical levels . For >example, > >In one of column of a dataframe, there are numbers: 1,2

[R] covert categoral data into number

2021-06-12 Thread Jxay Ljj
Hi I would like to convert numbers into different categorical levels . For example, 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? Thanks, JL [[alternative HTML version deleted]] ___