You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5.5.2 Factors :
"R uses the levels attribute when it displays the factor, as you will see. R will display each 1 as female, the first label in the levels vector, and each 2 as male, the second label. If the factor included 3s, they would be displayed as the third label, and so on: …"
It's wrong! Because if we add an object that start with a letter that's alphabetically before 'f' , for example starts with 'a' in 'another' , the labels of factor class will change. It will be :
'another' ---> 1
'female' ---> 2
'male' ---> 3
To be more obvious, I write this part of code:
5.5.2 Factors :
"R uses the levels attribute when it displays the factor, as you will see. R will display each 1 as female, the first label in the levels vector, and each 2 as male, the second label. If the factor included 3s, they would be displayed as the third label, and so on: …"
It's wrong! Because if we add an object that start with a letter that's alphabetically before 'f' , for example starts with 'a' in 'another' , the labels of factor class will change. It will be :
'another' ---> 1
'female' ---> 2
'male' ---> 3
To be more obvious, I write this part of code:
You saw that the label of "another" is 1. That means the numbering of the factor is alphabetical.
sorry for my bad English. :)
The text was updated successfully, but these errors were encountered: