New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace typeof
with class
in episode 4
#350
Comments
@davebridges Thanks for that suggestion. I don't think the lesson ever uses |
I agree it's confusing. I wonder whether using
It would mean introducing |
Yes, agreed, factors are a little weird. However, my inclination is to leave the lesson as it is. It is true that if people go poking around on their own, they may get confused, but the pace of a workshop is usually rapid enough that there's not too much of that going on. Also, the fact that |
To bring this issue back up, I'm inclined to agree with @davebridges. This section where
I feel like the question "why doesn't
|
I agree with naupaka that this a learning opportunity. Factors are so central to R that understanding them thoroughly would be beneficial. When typeof(cats$coat) returns "integer" that's a first brush with factor innards, which will be further reinforced later where factors are discussed in more detail. |
In lesson 04-data-structures-part1, under data types the user learns using
typeof
to determine the structure of data. This can be confusing because thetypeof
of a factor returns an integer not a factor as one might expect. I suggest modifying this lesson to useclass
instead which returns a data type of factor. This may be less confusing to the new learner. For example:The text was updated successfully, but these errors were encountered: