diff --git a/help.html b/help.html index 04a0a2c0..38238e8d 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] 332 237 383 392 605
+## [1] 600 338 310 268 3710
Using just this will only print the result and not actually change new_rivers
:
new_rivers + 1
-## [1] 333 238 384 393 606
+## [1] 601 339 311 269 3711
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] 333 238 384 393 606
+## [1] 601 339 311 269 3711
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] 334 239 385 394 607
+## [1] 602 340 312 270 3712
x <- c(1, 2, 3)
+x
+## [1] 1 2 3
Add a new header with two hash symbols ##
at the start of a line with some text. Knit the report to see how it looks.