
上QQ阅读APP看书,第一时间看更新
Factor
We now see that the class is a factor, as we can see in the following output:
[1] "factor"
Now, we can also look at the internal structure of this vector x, using str() as follows:
str(x)
We now see that it converts 1, 2, and 3 to factors:
[1] Factor w/ 3 levels "1", "2", "3": 1 2 3