Skip to content

Commit

Permalink
Updating the lab links
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Sep 12, 2024
1 parent eecccb7 commit f3d1743
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions 03-more-functions-and-datatable/lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -3145,7 +3145,7 @@ <h2 class="anchored" data-anchor-id="part-1-setup-the-git-project-and-the-github
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> PHS7045-labs</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="co"># Step 2</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="fu">wget</span> https://raw.githubusercontent.com/UofUEpiBio/PHS7045-advanced-programming/main/03-functions-and-datatable/lab.qmd</span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="fu">wget</span> https://raw.githubusercontent.com/UofUEpiBio/PHS7045-advanced-programming/main/03-more-functions-and-datatable/lab.qmd</span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="fu">mv</span> 03-functions-and-datatable.qmd README.qmd</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a><span class="co"># Step 3</span></span>
Expand All @@ -3167,7 +3167,7 @@ <h2 class="anchored" data-anchor-id="part-1-setup-the-git-project-and-the-github
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="co"># Step 2</span></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="ex">download.file</span><span class="er">(</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;https://raw.githubusercontent.com/UofUEpiBio/PHS7045-advanced-programming/main/03-functions-and-datatable/lab.qmd&quot;</span><span class="ex">,</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;https://raw.githubusercontent.com/UofUEpiBio/PHS7045-advanced-programming/main/03-more-functions-and-datatable/lab.qmd&quot;</span><span class="ex">,</span></span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a> <span class="ex">destfile</span> = <span class="st">&quot;README.qmd&quot;</span></span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a> <span class="kw">)</span></span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a></span>
Expand Down
4 changes: 2 additions & 2 deletions 03-more-functions-and-datatable/lab.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ mkdir PHS7045-labs
cd PHS7045-labs

# Step 2
wget https://raw.githubusercontent.com/UofUEpiBio/PHS7045-advanced-programming/main/03-functions-and-datatable/lab.qmd
wget https://raw.githubusercontent.com/UofUEpiBio/PHS7045-advanced-programming/main/03-more-functions-and-datatable/lab.qmd
mv 03-functions-and-datatable.qmd README.qmd

# Step 3
Expand Down Expand Up @@ -81,7 +81,7 @@ setwd("PHS7045-labs")

# Step 2
download.file(
"https://raw.githubusercontent.com/UofUEpiBio/PHS7045-advanced-programming/main/03-functions-and-datatable/lab.qmd",
"https://raw.githubusercontent.com/UofUEpiBio/PHS7045-advanced-programming/main/03-more-functions-and-datatable/lab.qmd",
destfile = "README.qmd"
)

Expand Down
5 changes: 4 additions & 1 deletion 03-more-functions-and-datatable/slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ Notice the function `fifelse()`. Now, let's try to merge the data!

```{r}
#| label: merge-try1
#| echo: true
merge(
# Data
x = dat,
Expand All @@ -871,7 +872,7 @@ merge(
by.y = "USAF",
# Which obs to keep?
all.x = TRUE,
all.y = FALSE
all.y = FALSE,
) %>% nrow()
```

Expand All @@ -881,8 +882,10 @@ that the `stations` dataset has duplicated IDs. We can fix this:
```{r}
#| label: drop-dpl
#| results: 'hide'
#| echo: true
stations[, n := 1:.N, by = .(USAF)]
stations <- stations[n == 1,][, n := NULL]
```

:::
Expand Down

0 comments on commit f3d1743

Please sign in to comment.