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

typeof() #294

Open
bbolker opened this Issue Aug 1, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@bbolker
Contributor

bbolker commented Aug 1, 2017

This is a fairly major philosophical question, but: is it really worth leading with typeof() in the data structures lesson, or would it be better to lead with class() and possibly mention typeof() later on (in passing, or in a tip/callout box)?

Arguments for typeof():

  • systematic
  • will appeal to computer scientists and people who like to know how it all works "under the hood"
  • limited number of possibilities

Arguments against typeof() (and in favo(u)r of class):

  • typeof() adds to confusion over factors
  • class is explicitly a logical description of an object's type, not its underlying properties

Some more discussion here and here (including "mode", which lumps integer and double together as "numeric" but mode(factor) is still "numeric" ...

While we're at it, I would vote for leaving out the "complex" type, or mentioning it in a callout ...

@naupaka

This comment has been minimized.

Member

naupaka commented Aug 1, 2017

I am happy to have it either way. Preference @noamross @karawoo @aammd @tomwright01 ?

@karawoo

This comment has been minimized.

Contributor

karawoo commented Aug 4, 2017

Yeah, I don't feel that strongly on this one. But 👍 to glossing over "complex".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment