You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can follow along with the demonstrations, then there will be more time for practice during the lab at the end of lecture
23
+
22
24
## R as a calculator
23
25
24
26
- The R console is a full calculator
@@ -156,7 +158,7 @@ name
156
158
157
159
## Combining objects with `c()`
158
160
159
-
Use `c()` to collect/combine single R objects into a <spanstyle="color:blue">vector</span> of R objects. It is mostly used for creating vectors of numbers and character strings.
161
+
Use `c()` to collect/combine single R objects into a <spanstyle="color:blue">vector</span> of R objects. It is mostly used for creating vectors of multiple items, including numbers and character strings.
Use `replace = FALSE` if you are doing a random sample from a larger population, or if you want to randomize the order of a population.
366
+
367
+
Use `replace = TRUE` if you are doing bootstrapping or any resampling procedure.
368
+
361
369
## Installing packages to do more!
362
370
363
371
Some functions and data come with R right out of the box ("base R"). We will add more functionality with <spanstyle="color:blue">packages</span>. Think of these like "expansion packs" for R.
364
372
365
-
Must be done **once** for each installation of R (e.g., version 4.2\>\> 4.3).
373
+
Must be done **once** for each installation of R (e.g., version 4.4\>\> 4.5).
366
374
367
375
An important package we will use is `tidyverse`. It is a mega-package great for data import, wrangling, and visualization.
0 commit comments