diff --git a/help.html b/help.html index 41f4951b..a8186b82 100644 --- a/help.html +++ b/help.html @@ -353,14 +353,14 @@
Here we are creating a new object from an existing one:
new_rivers <- sample(rivers, 5)
new_rivers
-## [1] 618 720 625 425 1270
+## [1] 890 392 315 411 460
Using just this will only print the result and not actually change new_rivers
:
new_rivers + 1
-## [1] 619 721 626 426 1271
+## [1] 891 393 316 412 461
If we want to modify new_rivers
and save that modified version, then we need to reassign new_rivers
like so:
new_rivers <- new_rivers + 1
new_rivers
-## [1] 619 721 626 426 1271
+## [1] 891 393 316 412 461
If we forget to reassign this can cause subsequent steps to not work as expected because we will not be working with the data that has been modified.
Make sure you run something like this, with the <-
operator:
rivers2 <- new_rivers + 1
rivers2
-## [1] 620 722 627 427 1272
+## [1] 892 394 317 413 462
Feel free to submit typos/errors/etc via the GitHub repository associated with the class: https://github.com/fhdsl/DaSEH
-This page was last updated on 2024-10-10.
+This page was last updated on 2024-10-23.
diff --git a/materials_schedule.html b/materials_schedule.html index 7a93edda..ceb6405e 100644 --- a/materials_schedule.html +++ b/materials_schedule.html @@ -496,7 +496,9 @@er <- read_csv(file = "https://daseh.org/data/CO_ER_heat_visits.csv")@@ -599,7 +599,7 @@ 11 2021 1.30 2.92 12 2022 1.93 4.71 -
across
from dplyr
across
from dplyr
Combining with mutate()
- the replace_na
function
sapply
sapply
df_list %>% sapply(nrow)@@ -774,7 +774,7 @@ - +