Code annotations

Author

Josef Fruehwald

If you look at a block of code and see a little number symbol like this ①, that means you can click on it to get some info about what the code is doing.

library(tidyverse)
library(babynames)

babynames |>
  filter(
    name == "Josef"
  ) |>
  summarise(
    total = sum(n)
  )
1
Loading packages
2
This will return only the rows of babynames where name == "Josef".
3
This will return a single row data frame where total is the sum of n, which, in this case, is the total number of babies named "Josef" in the data.

Reuse

CC-BY 4.0

Citation

BibTeX citation:
@online{fruehwald,
  author = {Fruehwald, Josef},
  title = {Code Annotations},
  url = {https://lin611-2024.github.io/notes/concepts/code-annotations/},
  langid = {en}
}
For attribution, please cite this work as:
Fruehwald, Josef. n.d. “Code Annotations.” https://lin611-2024.github.io/notes/concepts/code-annotations/.