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

Update 05-data-structures-part2.Rmd #452

Open
wants to merge 1 commit into
base: gh-pages
from

Conversation

Projects
None yet
3 participants
@Malarkey73

Malarkey73 commented Nov 7, 2018

I think for novices the idea of "names(cats)" a longer vector being %in% c("age") a single character vector is extraneous cognitive load. NB the c() is un-necessary too.
More natural just to ask are the names equal "==". Maybe also change "!drop" to "-drop" as that again is consistent with the previous examples of column selection immediately above.

Please delete the text below before submitting your contribution.


Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution.

Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact Kate Hertweck (k8hertweck@gmail.com).


Update 05-data-structures-part2.Rmd
I think for novices the idea of  "names(cats)" a longer vector being %in%  c("age") a single character vector is extraneous cognitive load. NB the c() is un-necessary too. 
More natural just to ask are the names equal "==". Maybe also change "!drop" to "-drop" as that again is consistent with the previous examples of column selection immediately above.
@naupaka

This comment has been minimized.

Member

naupaka commented Nov 19, 2018

@Malarkey73 thanks for the PR! I agree it could be confusing, but the counterargument is that it enables removal of multiple discontiguous columns. The switch from !drop to -drop is a slightly different issue. Thoughts @jcoliver @mawds ?

@jcoliver

This comment has been minimized.

Collaborator

jcoliver commented Nov 27, 2018

Good point @Malarkey73 . The %in% operator is covered more in depth in episode 06, so I agree that using names(cats) == "age" would be appropriate at this point in the lesson. As for -drop vs. !drop...I think keeping the logical operator (!) makes sense since the result of names(cats) == "age" is a logical vector.

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