datacarpentry / R-ecology-lesson

Data Analysis and Visualization in R for Ecologists
https://datacarpentry.org/R-ecology-lesson/
Other
314 stars 508 forks source link

Code Handout #794

Closed ericcrandall closed 4 months ago

ericcrandall commented 2 years ago

This is a really great lesson, and I'm glad it includes a code handout for beginners. However, as I went to teach the lesson for my checkout, I found myself getting lost in the handout, as only challenges and some section headings are given. Would be helpful to provide commented headings for each of the episodes, and any subheadings that include code as part of the instruction. I wanted to try to do this as a pull request, but am not very familiar with make files.

seanbergin commented 2 years ago

I was assigned the beginning of the starting with data section of this lesson. There is a long command/url that students must enter correctly: download.file(url = "https://ndownloader.figshare.com/files/2292169", destfile = "data_raw/portal_data_joined.csv")

I know that we want students to type everything on their own, but waiting for typos in this section to be resolved seems like an unnecessary roadblock. I would like to suggest that the code handout include the above URL so that students can copy/paste it. One can include the url - but not the command so that the instructor can live code the rest.

Teebusch commented 2 years ago

Both great suggestions!

@ericcrandall good point. The code handout doesn't really have much to do with the make file, I think. What ends up in the handout is determined by putting it in the lesson .Rmd inside a knitr chunks with purl=TRUE set. For example

## Vectors and data types

```{r, echo = FALSE, purl = TRUE}
### Vectors and data types
[(see in file)](https://github.com/datacarpentry/R-ecology-lesson/blob/d455aa5e69682a3c0413e6c2a9a29f7816e07d20/01-intro-to-r.Rmd#L259)

This will show the level 2 heading in the lesson and put a level 3 heading with the same text in the handout (not sure why one is level 2 and the other one level 3, to be honest). As you can imagine, this is a bit redundant and difficult to maintain. To fix the issue you are mentioning, someone needs to go through the code alongside the handout and fix the inconsistencies. For example, to add a level 1 heading before each chapter, one would have to add, at the beginning of each .Rmd file, something like 

``````r
```{r, echo = FALSE, purl = TRUE}
# Before we Start


@seanbergin, I usually copy-paste the URL into the etherpad that I share with the learners. But it wouldn't hurt to have the link in the code handout, too.
tobyhodges commented 4 months ago

Thanks everyone for contributing to this discussion. The lesson underwent a major update and reorganisation when https://github.com/datacarpentry/R-ecology-lesson/pull/887 was merged. The current version of the lesson does not include the code handout, so I am going to close this issue. Please open a new issue if you believe it would be helpful to include a handout for the redesigned lesson.