diff --git a/03-more-functions-and-datatable/lab.html b/03-more-functions-and-datatable/lab.html
index c42d088..c57f9e7 100644
--- a/03-more-functions-and-datatable/lab.html
+++ b/03-more-functions-and-datatable/lab.html
@@ -3145,7 +3145,7 @@
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
@@ -3167,7 +3167,7 @@
# 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"
)
diff --git a/03-more-functions-and-datatable/lab.qmd b/03-more-functions-and-datatable/lab.qmd
index 3a4bcc1..596634f 100644
--- a/03-more-functions-and-datatable/lab.qmd
+++ b/03-more-functions-and-datatable/lab.qmd
@@ -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
@@ -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"
)
diff --git a/03-more-functions-and-datatable/slides.qmd b/03-more-functions-and-datatable/slides.qmd
index 2dcb3ea..d7650e5 100755
--- a/03-more-functions-and-datatable/slides.qmd
+++ b/03-more-functions-and-datatable/slides.qmd
@@ -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,
@@ -871,7 +872,7 @@ merge(
by.y = "USAF",
# Which obs to keep?
all.x = TRUE,
- all.y = FALSE
+ all.y = FALSE,
) %>% nrow()
```
@@ -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]
+
```
:::