Search This Blog

Tutorial # 8. Factors

Factors: In Data Science we need to deals with huge text data, which is very memory intensive.
hence we need to convert the text into numbers,

 "Factors" encode the strings into number, instead of storing the whole string it store the encoded numbers

Example:

factor_city = factor(c('Delhi' , 'Mumbai' ))
str(factor_city)

Output: 

  Factor w/ 2 levels "Delhi","Mumbai": 1 2

 

You may also interested in:

An Introduction to language R
Tutorial # 1.Data Type & Variable  Declaration
Tutorial # 2.Operators
Tutorial # 3.Vector  & Element Access
Tutorial # 4.Matrix
Tutorial # 5.Data Frame
Tutorial # 6.Arrays
Tutorial # 7.Lists
Tutorial # 8.Factors
Tutorial # 9.Data import
Tutorial # 10.Machine Learning
Tutorial # 11.Visualization


Post a Comment

0 Comments