R-ecology-lesson icon indicating copy to clipboard operation
R-ecology-lesson copied to clipboard

Code Handout

Open ericcrandall opened this issue 2 years ago • 2 comments

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.

ericcrandall avatar May 13 '22 14:05 ericcrandall

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.

seanbergin avatar May 17 '22 17:05 seanbergin

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)

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, 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.

Teebusch avatar May 25 '22 07:05 Teebusch