March 2019
Beginner to intermediate
250 pages
6h 6m
English
A vector of strings of a character is known as a factor. It is used to represent categorical data, and may also include the different levels of the categorical variable. Factors are created with the factor command:
r<-c(1,4,7,9,8,1)r<-factor(r)r## [1] 1 4 7 9 8 1## Levels: 1 4 7 8 9
Read now
Unlock full access