Abstract
Factors are variables in R, which take on a limited number of different values; such variables are often referred to as categorical variables. One of the most important uses of factors is in statistical modeling; since categorical variables enter into statistical models such as lm and glm differently than continuous variables, storing data as factors insures that the modeling functions will treat such data correctly.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Boehmke, B.C. (2016). Dealing with Factors. In: Data Wrangling with R. Use R!. Springer, Cham. https://doi.org/10.1007/978-3-319-45599-0_7
Download citation
DOI: https://doi.org/10.1007/978-3-319-45599-0_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-45598-3
Online ISBN: 978-3-319-45599-0
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)