i have data of economic status of households listed as (3,2,1) now i want to assign them so that R recognize them as ordered variable (3= reach, 2= average, 1= poor). can you please help me with this. data is already loaded into R
Asked
Active
Viewed 99 times
0
-
1When asking for help, you should include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Jul 03 '18 at 20:47
-
You are looking for [value labels](https://www.statmethods.net/input/valuelabels.html). In the future, see the post @MrFlick linked to for supplying reproducible examples. – Anonymous coward Jul 03 '18 at 20:49
-
You are referring to a factor type or variable class. You can check [link1](http://monashbioinformaticsplatform.github.io/2015-09-28-rbioinformatics-intro-r/01-supp-factors.html) and [link2](https://forcats.tidyverse.org/) for more information. – Prometheus Jul 04 '18 at 05:59