## Inside code chunks, lines beginning with a # character are comments
## Comments are ignored by R
<- c(1, 1, 2, 4, 1, 3, 1, 5) # Anything after a # character is ignored as well my_numbers
January 23, 2024
What we’ll be Doing
01-problem-set.Rproj
file.Using Quarto to produce and reproduce your work
TYPE OUT
YOUR CODE
BY HAND
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.3 ✔ readr 2.1.4
✔ forcats 1.0.0 ✔ stringr 1.5.0
✔ ggplot2 3.4.4 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.0
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package to force all conflicts to become errors
The tidyverse has several components.
We’ll return to this message about Conflicts later.
library
(tidyverse)
Loading tidyverse: ggplot2
Loading tidyverse: tibble
Loading tidyverse: tidyr
Loading tidyverse: readr
Loading tidyverse: purrr
Loading tidyverse: dplyr
<|
Draw graphs<|
Nicer data tables<|
Tidy your data<|
Get data into R<|
Fancy Iteration<|
Action verbs for tablesCode you can type and run:
Output:
This is equivalent to running the code above, typing my_numbers
at the console, and hitting enter.
By convention, code output in documents is prefixed by ##
Also by convention, outputting vectors, etc, gets a counter keeping track of the number of elements. For example,
[1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s"
[20] "t" "u" "v" "w" "x" "y" "z"