Tuesday 8 August 2017

Data Science Tutorial Part 5 Factors

  1. Factors
  1. The term factor refers to a statistical data type used to store categorical variables.
  2. The difference between a categorical variable and a continuous variable is that a categorical variable can belong to a limited number of categories. A continuous variable, on the other hand, can correspond to an infinite number of values.
  3. A good example of a categorical variable is the variable 'Gender' (male and Female) ,Blood Groups (A,B,AB,O),Eye Color (amber, blue,brown, gray, green, hazel, or red),Months names (jan,feb,mar,..etc)



  4. Create a blood group factor
  5. Order levels differently
  6. Rename factor levels
  7. Rename factor levels in customized format
  8. Nominal Vs Ordinal
    1. Nominal
    2. Ordinal
For more information read https://www.stat.berkeley.edu/classes/s133/factors.html or https://cran.r-project.org/doc/manuals/R-intro.html#Factors or https://stat.ethz.ch/R-manual/R-devel/library/base/html/factor.html

No comments:

Post a Comment