Open Talishask opened 3 years ago
Hi @Talishask, these changes look great to me. Congratulations on completing the instructor training! Would you be willing to open a PR with these changes?
Hi @HaoZeke - I've reached out to the contributor and let them know. Thanks
I'm a member of The Carpentries staff and I'm submitting this issue on behalf of another member of the community. In most cases, I won't be able to follow up or provide more details other than what I'm providing below.
As part of my checkout process, I would like to make contributions to Programming in R. I made some suggestions about the narratives, wording, and examples in two lessons: Data Types and Structures and Understanding Factors.
Lesson: Data Types and Structures
R has many data structures. These include • atomic vector • list • matrix • data frame • factors
Vectors A vector is the most common and basic data structure in R and is pretty much the workhorse of R. Technically, vectors can be one of two types:
• atomic vectors • lists
Although the term “vector” most commonly refers to the atomic types not to lists.
In most scenarios, people refer to the atomic vector, not the list, when discussing vectors.
Other Special Values
Lesson: Understanding Factors
Sometimes, the order of the factor does not matter, other times you might want to specify the order because it is meaningful (e.g., “low”,”medium”,”high”) or it is required by particular type of analysis. Additionally, specifying the order of the levels allows us to compare levels:
R
food <- factor(c(“low”, “high”, “medium”, “high”, “low”, “medium”, “high”))
Levels(food)
Output
[1] “high” “low” “medium”
Converting Factors
This section is a bit confusing. According to the example provided here, f<-factor(c(3.4, 1.2, 5)), f is an integer factor. Therefore, the following command as.numeric(f) does not add much. In fact, it confuses the audience and makes indexing harder