diff --git a/help.html b/help.html index c7662bb6..66398268 100644 --- a/help.html +++ b/help.html @@ -405,16 +405,16 @@
Here we are creating a new object from an existing one:
new_rivers <- sample(rivers, 5)
new_rivers
-## [1] 605 260 230 306 1038
+## [1] 1243 2533 310 250 377
Using just this will only print the result and not actually change
new_rivers
:
new_rivers + 1
-## [1] 606 261 231 307 1039
+## [1] 1244 2534 311 251 378
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] 606 261 231 307 1039
+## [1] 1244 2534 311 251 378
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.
@@ -484,7 +484,7 @@rivers2 <- new_rivers + 1
rivers2
-## [1] 607 262 232 308 1040
+## [1] 1245 2535 312 252 379
Introduction to
-R for Public Health Researchers