Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Data Types and Structures: discussion on types versus structures #423
I think it would be helpful to include a discussion on data types versus structures in the Data Types and Structures lesson.
Particularly for users of R that have some experience with other programming languages (e.g. Python, ...), one of the most difficult parts of getting started with R is understanding what sorts of objects there are in R and how these objects behave. As the lesson points out, "Everything in R is an object". However, unlike in other programming languages, users typically interact with primitive data types only through the (complex) data structures of atomic vector, list, etc.
This contrasts with how many students typically first encounter the idea of "data types". In C++/C#/Java/etc. students might first learn
I would be happy to work on this issue, in particular by adding some information from the Data Strcutures chapter of Hadley Wickham's Advanced R.
Note: I stumbled across this repository/project through a Google search for "r data types vs structures". It is the first result for this search query as of 5/4/2019!
Thanks for pointing this out, Alan! Do you think that any of the "objectives" or "keypoints" should be clarified or corrected? If yes, we can discuss specifics in a (draft) PR. Adding the book reference you suggest could also work nicely (to the start or end of that episode, maybe? See
Re: Note Some SEO just does itself :-D
Here are some suggestions I believe could easily be incorporated without introducing more concepts and tools.
Addition to first objective
Addition to second key point
This information is presented implicitly in the lesson, which describes how to work with some data structures and restrictions that go into making them. Clarifying these points in the objectives/key points will be reinforcing what is already there.
I could also look over doing some edits to some wording in the text, e.g.
Make objectives consistently start with verbs:
the second paragraph in "Understanding Basic Data Types in R":
As a pull request, please ;-) If you open https://github.com/swcarpentry/r-novice-inflammation/edit/master/_episodes_rmd/13-supp-data-structures.Rmd, is there