Evidence, trainers and tools for doctors and medical students
←
Book 6 · R, reproducibility engineering and data management · Rung 1Book 6
For Doctors

Obesity Expertise · Book 6

R, reproducibility engineering and data managementRung 1 · Introductory

One dataset, one script, one command

Dr. Harsh Maheshwari · Version 1.0 · updated 3 October 2026 · CC BY-NC-SA 4.0

Download the PDF

Why this book

Most analyses that cannot be repeated were not wrong in their statistics. They were done by hand: a cell edited in a spreadsheet, a number pasted from a screen, a step nobody wrote down. This book teaches the opposite habit from the first line. You learn R as a language with objects, functions and packages, the tidyverse verbs that import, clean, summarise and plot a data frame, and one rule that makes the rest worth doing: raw data is never edited and every change lives in code that another person can run.

How to read it

Read Book 0 first, or at least the sections this book names as it goes. Then read this one in order, with R open beside it and every example typed, not pasted. The book asks you to build one thing: a single dataset analysed from raw file to final figure in one script that another person can run with one command. Start the script in the first section and extend it as you read.

Before you start

Book 0, chiefly reading a table (F1), functions as input, rule and output (C4), average and spread (D5), graphs (C5, F2) and units (B1, B2, B6). The mathematics is Book 0’s arithmetic only: percentages, a mean and a median, and BMI as weight divided by height squared; nothing beyond it is used. No programming, no knowledge of files and folders and no statistics software is assumed; you need a computer on which you can install R and RStudio.

1 When data change silently: three documented failures

2 Installing R and an editor; the console and the script

3 Objects and names

4 Vectors, types and NA

5 Functions and arguments

6 Packages: where they come from and which version you have

7 A project folder, and paths that work on someone else’s computer

8 Tidy data and the data frame

9 Reading a raw file without changing it

10 The data dictionary and the README

11 Choosing rows and columns

12 Making new columns

13 Missing values: counting them and saying how many

14 Categories as factors

15 Dates

16 Summaries by group

17 Reshaping and joining

18 Plotting with the grammar of graphics

19 Checking the data in code

20 Does shared code rerun? What studies found

21 Top to bottom in a fresh session, with one command

22 Worked journey: One dataset, end to end

References 377
  1. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. Abstract: Excel with default settings. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  2. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. Background, first paragraph: the SEPT2 and MARCH1 examples. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  3. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. Methods: 18 journals, 2005 to 2015. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  4. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, first paragraph: files screened and papers with gene lists. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  5. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, first paragraph: confirmed errors. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  6. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, first paragraph: the proportion affected. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  7. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. Discussion, first paragraph: no permanent switch. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  8. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. Discussion, second paragraph: files whose original names cannot be recovered. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  9. Bruford, Elspeth A. and Braschi, Bryony and Denny, Paul and Jones, Tamsin E. M. and Seal, Ruth L. and Tweedie, Susan. Guidelines for Human Gene Nomenclature. 2020. p. 757, Box 3 “Scenarios that may merit a symbol change”: symbols that affect data handling. https://doi.org/10.1038/s41588-020-0669-3.
  10. Bruford, Elspeth A. and Braschi, Bryony and Denny, Paul and Jones, Tamsin E. M. and Seal, Ruth L. and Tweedie, Susan. Guidelines for Human Gene Nomenclature. 2020. p. 754, introduction: the committee’s name. https://doi.org/10.1038/s41588-020-0669-3.
  11. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 259, introduction: the three problems. https://doi.org/10.1093/cje/bet075.
  12. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 261, section 3 Replication: the posted spreadsheets could not reproduce the results. https://doi.org/10.1093/cje/bet075.
  13. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 263, section 3.2 Spreadsheet coding error. https://doi.org/10.1093/cje/bet075.
  14. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 263, footnote 9: the rows the formula averaged. https://doi.org/10.1093/cje/bet075.
  15. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 262, section 3.1: the exclusions not declared. https://doi.org/10.1093/cje/bet075.
  16. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 264, section 3.3 and Table 2: country-years above 90%, correct total. https://doi.org/10.1093/cje/bet075.
  17. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 264, section 3.3: after the chosen exclusions. https://doi.org/10.1093/cje/bet075.
  18. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 264, section 3.3: after the exclusions and the spreadsheet errors. https://doi.org/10.1093/cje/bet075.
  19. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 257, abstract: 2.2% against the published −0.1%. https://doi.org/10.1093/cje/bet075.
  20. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 268, section 3.5: interactive effects. https://doi.org/10.1093/cje/bet075.
  21. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 265, section 3.4: one number per country, whatever its years. https://doi.org/10.1093/cje/bet075.
  22. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 269, Table 5, last two “Interactive effects” rows, >90% column: 0.0 with three problems, −0.1 with the transcription error added. https://doi.org/10.1093/cje/bet075.
  23. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 269, Table 5, row “Spreadsheet error only”, last column (>90%). https://doi.org/10.1093/cje/bet075.
  24. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 277, section 4 Conclusion: the errors acknowledged. https://doi.org/10.1093/cje/bet075.
  25. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2013. Working paper, p. 14, footnote 9: reproducible code against working spreadsheets. https://peri.umass.edu/publication/does-high-public-debt-consistently-stifle-economic-growth-a-critique-of-reinhart-and-rogoff/ (accessed 2026-10-02).
  26. Public Health England. PHE statement on delayed reporting of COVID-19 cases. 2020. Statement of Michael Brodie, first paragraph: 15,841 cases. GOV.UK news story. https://www.gov.uk/government/news/phe-statement-on-delayed-reporting-of-covid-19-cases (accessed 2026-10-02).
  27. Public Health England. PHE statement on delayed reporting of COVID-19 cases. 2020. Statement of Michael Brodie, first paragraph: when and where it was found. GOV.UK news story. https://www.gov.uk/government/news/phe-statement-on-delayed-reporting-of-covid-19-cases (accessed 2026-10-02).
  28. Public Health England. PHE statement on delayed reporting of COVID-19 cases. 2020. Background information, fourth paragraph: the cause. GOV.UK news story. https://www.gov.uk/government/news/phe-statement-on-delayed-reporting-of-covid-19-cases (accessed 2026-10-02).
  29. Public Health England. PHE statement on delayed reporting of COVID-19 cases. 2020. Background information, fourth paragraph: the fix. GOV.UK news story. https://www.gov.uk/government/news/phe-statement-on-delayed-reporting-of-covid-19-cases (accessed 2026-10-02).
  30. Public Health England. PHE statement on delayed reporting of COVID-19 cases. 2020. Background information, fourth paragraph: checks already in place. GOV.UK news story. https://www.gov.uk/government/news/phe-statement-on-delayed-reporting-of-covid-19-cases (accessed 2026-10-02).
  31. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 263, section 3.2: the omitted countries alphabetical. https://doi.org/10.1093/cje/bet075.
  32. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. p. 259, introduction: the 20 advanced economies. https://doi.org/10.1093/cje/bet075.
  33. Public Health England. PHE statement on delayed reporting of COVID-19 cases. 2020. Statement of Michael Brodie, second paragraph: test results not affected. GOV.UK news story. https://www.gov.uk/government/news/phe-statement-on-delayed-reporting-of-covid-19-cases (accessed 2026-10-02).
  34. Public Health England. PHE statement on delayed reporting of COVID-19 cases. 2020. Statement of Susan Hopkins, fourth paragraph: cases passed to contact tracing. GOV.UK news story. https://www.gov.uk/government/news/phe-statement-on-delayed-reporting-of-covid-19-cases (accessed 2026-10-02).
  35. Public Health England. PHE statement on delayed reporting of COVID-19 cases. 2020. Background information, last paragraph before the table: the recorded dates. GOV.UK news story. https://www.gov.uk/government/news/phe-statement-on-delayed-reporting-of-covid-19-cases (accessed 2026-10-02).
  36. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Data management, practice 1a “Save the raw data”. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  37. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 2: Avoid Manual Data Manipulation Steps. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  38. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. p. 2, section 1 Introduction: analysis in a separate program. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  39. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. figures quoted in the text. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  40. Herndon, Thomas and Ash, Michael and Pollin, Robert. Does High Public Debt Consistently Stifle Economic Growth? A Critique of Reinhart and Rogoff. 2014. figures quoted in the text. https://doi.org/10.1093/cje/bet075.
  41. Public Health England. PHE statement on delayed reporting of COVID-19 cases. 2020. figures quoted in the text. GOV.UK news story. https://www.gov.uk/government/news/phe-statement-on-delayed-reporting-of-covid-19-cases (accessed 2026-10-02).
  42. The Carpentries. R for Reproducible Scientific Analysis. 2026. Summary and Setup, Prerequisites: install R, then RStudio. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  43. The Carpentries. R for Reproducible Scientific Analysis. 2026. Summary and Setup, Prerequisites: what RStudio is. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  44. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Introduction, Prerequisites, “R”: where to download R. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  45. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Introduction, Prerequisites, “RStudio”: where to download RStudio. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  46. The Carpentries. R for Reproducible Scientific Analysis. 2026. Episode 1, “Workflow within RStudio”, way 2: lines pushed to the console. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  47. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Introduction, Prerequisites, “RStudio”. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  48. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Section 1.8 “R commands, case sensitivity, etc.”: an expression is printed and lost. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  49. The Carpentries. R for Reproducible Scientific Analysis. 2026. Episode 1, “Using R as a calculator”: the + prompt. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  50. The Carpentries. R for Reproducible Scientific Analysis. 2026. Episode 1, “R scripts”. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  51. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Section 6.2.1 “What is the source of truth?”. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  52. The Carpentries. R for Reproducible Scientific Analysis. 2026. Episode 1, “Using R as a calculator”: order of operations. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  53. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Section 2.2 “Vector arithmetic”: the arithmetic operators, ending with the sign for a power. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  54. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Section 2.2 “Comments”. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  55. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Section 2.2 “Comments”: comments for why. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  56. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Section 6.1.1 “Running code”: Ctrl + Enter. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  57. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Section 6.1 “Scripts”: opening a new script. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  58. The Carpentries. R for Reproducible Scientific Analysis. 2026. Episode 1, tip “Running segments of your code”: running a block. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  59. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Section 6.1.3 “Saving and naming”: informative names. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  60. The tidyverse team. The tidyverse style guide. Chapter 1 “Files”, 1.1 Names, rule 1. Online book. https://style.tidyverse.org/ (accessed 2026-10-02).
  61. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Section 1.8 “R commands, case sensitivity, etc.”: an assignment is not printed. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  62. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Section 1.10, objects: what R creates and manipulates. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  63. The Carpentries. R for Reproducible Scientific Analysis. 2026. Episode 1, “Variables and assignment”: the right-hand side first. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  64. The Carpentries. R for Reproducible Scientific Analysis. 2026. Episode 1, “Variables and assignment”: reassignment. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  65. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Section 1.8: case sensitivity. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  66. The Carpentries. R for Reproducible Scientific Analysis. 2026. Episode 1, “Variables and assignment”: which names are allowed. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  67. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Section 1.8: names starting with a dot. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  68. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Section 1.10: the workspace. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  69. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Section 2.4 “Calling functions”, last sentence: the environment tab. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  70. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Section 6.2.1 “What is the source of truth?”: the environment against the script. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  71. The tidyverse team. The tidyverse style guide. 2.1 Object names. Online book. https://style.tidyverse.org/ (accessed 2026-10-02).
  72. The tidyverse team. The tidyverse style guide. 2.8 Assignment. Online book. https://style.tidyverse.org/ (accessed 2026-10-02).
  73. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Section 2.1 “Vectors and assignment”: = as an alternative. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  74. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Section 2.1 “Vectors and assignment”: = as an alternative, continued. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  75. The tidyverse team. The tidyverse style guide. 2.2.4 Infix operators: spaces round <-. Online book. https://style.tidyverse.org/ (accessed 2026-10-02).
  76. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [2.1 Vectors and assignment], opening paragraph: the numeric vector. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  77. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [3.1 Intrinsic attributes: mode and length], second paragraph: one mode per vector. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  78. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “c” (base 4.3.3), Description and Details: the common type and its hierarchy. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  79. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 04 Data Structures, “Coercion by combining vectors”. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  80. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “mean” (base 4.3.3), Value: a vector that is not numeric or logical. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  81. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [2.2 Vector arithmetic], first paragraph: element by element, and recycling. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  82. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [2.2 Vector arithmetic], first paragraph: a constant is repeated. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  83. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [2.4 Logical vectors]: comparisons make logical vectors. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  84. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [2.5 Missing values], first paragraph: why an operation on NA gives NA. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  85. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “NA” (base 4.3.3), Details: logical computations with NA. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  86. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [2.5 Missing values], third paragraph: x == NA against is.na(x). https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  87. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [2.7 Index vectors], opening paragraph: square brackets. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  88. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “Round” (base 4.3.3), Details: the represented number and the printed number. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  89. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “Round” (base 4.3.3), Warning: decimal fractions in binary. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  90. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. figures quoted in the text. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  91. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 01, “Mathematical functions”: arguments are what goes inside the brackets. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  92. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 2 Workflow: basics, 2.4 Calling functions: arguments by name and by position. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  93. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 03 Seeking Help, “Reading Help Files”: the sections of a help page, Usage. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  94. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 03 Seeking Help, “Reading Help Files”: the sections of a help page, Value. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  95. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “mean” (base 4.3.3), Arguments: na.rm. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  96. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “mean” (base 4.3.3), Arguments: trim, values outside 0 to 0.5. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  97. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “mean” (base 4.3.3), Arguments: trim, what it does. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  98. R Core Team. R 4.3.3, package stats: help pages. 2024. Help page “median” (stats 4.3.3), Arguments: na.rm. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  99. R Core Team. R 4.3.3, package stats: help pages. 2024. Help page “sd” (stats 4.3.3), Usage and Arguments. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  100. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “Round” (base 4.3.3), Description: round and its default. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  101. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 3 Data transformation, 3.1.3 dplyr basics: what the pipe does. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  102. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 3, 3.4 The pipe: the version of R that added it. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  103. The tidyverse team. The tidyverse style guide. Chapter 4 Pipes: layout. Online book. https://style.tidyverse.org/ (accessed 2026-10-02).
  104. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [1.7 Getting help with functions and features]: running a help page’s examples. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  105. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Introduction, Prerequisites, “The tidyverse”: what a package is. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  106. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [13.1 Standard packages]: the base packages ship with R. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  107. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [13.2 Contributed packages and CRAN]: where packages come from. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  108. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Introduction, Prerequisites, “R”: what CRAN stands for. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  109. R Core Team. R 4.3.3, package utils: help pages. 2024. Help page “install.packages” (utils 4.3.3), Description. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  110. R Core Team. R 4.3.3, package utils: help pages. 2024. Help page “install.packages” (utils 4.3.3), Arguments: pkgs, the current version. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  111. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [13 Packages], first paragraph: a package must be loaded. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  112. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “library” (base 4.3.3), Description. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  113. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “library” (base 4.3.3), Arguments: package, with or without quotation marks. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  114. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [1.10 Data permanency and removing objects]: a session has an end. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  115. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6 Workflow: scripts and projects, 6.2.1: the menu route to a fresh session. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  116. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “library” (base 4.3.3), Arguments: warn.conflicts, what a conflict is. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  117. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Introduction, Prerequisites, “The tidyverse”: the conflicts message on loading. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  118. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [13.3 Namespaces]: the double-colon operator. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  119. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. [13.3 Namespaces], last paragraph: :: loads the package. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  120. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Introduction, Prerequisites, “The tidyverse”: the nine core packages. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  121. R Core Team. R 4.3.3, package utils: help pages. 2024. Help page “packageDescription” (utils 4.3.3), Value: packageVersion. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  122. R Core Team. R 4.3.3, package utils: help pages. 2024. Help page “packageDescription” (utils 4.3.3), Details: comparing a version with text. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  123. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. Help page “penguins_raw”, Description and Format: what a row records. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  124. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. Version line at the head of the manual: a newer R than this book’s. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  125. Tidyverse team. Changelogs of ggplot2, dplyr, readr and tidyr: entries after ggplot2 3.4.4, dplyr 1.1.4, readr 2.1.5 and tidyr 1.3.1. 2026. dplyr changelog, dplyr 1.2.0 heading: a newer dplyr than this book’s. tidyverse.org. https://ggplot2.tidyverse.org/news/ (accessed 2026-10-02).
  126. Tidyverse team. Changelogs of ggplot2, dplyr, readr and tidyr: entries after ggplot2 3.4.4, dplyr 1.1.4, readr 2.1.5 and tidyr 1.3.1. 2026. dplyr changelog, dplyr 1.2.0, Minor improvements: the R version it requires. tidyverse.org. https://ggplot2.tidyverse.org/news/ (accessed 2026-10-02).
  127. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6 “Workflow: scripts and projects”, 6.2.2 “Where does your analysis live?”: the working directory. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  128. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6, 6.2.4 “Relative and absolute paths”, first paragraph: what a relative path is relative to. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  129. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6, 6.2.4 “Relative and absolute paths”, second paragraph: why absolute paths are never used in a script. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  130. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6, 6.2.4, last paragraph: backslashes in Windows paths. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  131. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6, 6.2.2, on setwd(). https://r4ds.hadley.nz/ (accessed 2026-10-02).
  132. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6, 6.1.3 “Saving and naming”, first of the three principles for file names. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  133. M"uller, Kirill. here: A Simpler Way to Find Your Files, version 1.0.1: help pages. 2020. Help page “here” (here 1.0.1), Description. R package, CRAN. https://CRAN.R-project.org/package=here (accessed 2026-10-02).
  134. M"uller, Kirill. here: A Simpler Way to Find Your Files, version 1.0.1: help pages. 2020. Help page “here” (here 1.0.1), “Project root”: the upward search and its markers. R package, CRAN. https://CRAN.R-project.org/package=here (accessed 2026-10-02).
  135. M"uller, Kirill. here: A Simpler Way to Find Your Files, version 1.0.1: help pages. 2020. Help page “here” (here 1.0.1), “Project root”, last sentence: the arguments become path components. R package, CRAN. https://CRAN.R-project.org/package=here (accessed 2026-10-02).
  136. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Project organization, recommendation 4a. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  137. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Project organization, recommendation 4c: raw data apart from generated files. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  138. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Data management, recommendation 1a “Save the raw data”. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  139. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Collaboration, recommendation 3a: the README. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  140. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 02 “Project Management With RStudio”, “Treat data as read only”. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  141. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 02, “Treat generated output as disposable”. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  142. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 02, “Version Control”. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  143. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6, 6.2.3 “RStudio projects”, first paragraph: making a project. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  144. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 04 “Data Structures”, after str(cats2): what a data frame is made of. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  145. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 04 “Data Structures”: the columns are vectors. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  146. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 1 “Data visualization”, 1.2.1 “The penguins data frame”: definition of a data frame. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  147. Wickham, Hadley. Tidy data. Article licensed CC BY (Creative Commons Attribution, per the journal’s article page). Quoted from the article PDF. Section 2.2 “Data semantics”, first paragraph: variable and observation. https://www.jstatsoft.org/article/view/v059i10 (accessed 2026-10-02).
  148. Wickham, Hadley. Tidy data. Article licensed CC BY (Creative Commons Attribution, per the journal’s article page). Quoted from the article PDF. Section 2.3 “Tidy data”: the three rules. https://www.jstatsoft.org/article/view/v059i10 (accessed 2026-10-02).
  149. Wickham, Hadley. Tidy data. Article licensed CC BY (Creative Commons Attribution, per the journal’s article page). Quoted from the article PDF. Section 2.3, after the three rules: any other arrangement. https://www.jstatsoft.org/article/view/v059i10 (accessed 2026-10-02).
  150. Wickham, Hadley. Tidy data. Article licensed CC BY (Creative Commons Attribution, per the journal’s article page). Quoted from the article PDF. Section 3 “Tidying messy datasets”, the list of the five most common problems (first, second and fourth items). https://www.jstatsoft.org/article/view/v059i10 (accessed 2026-10-02).
  151. Wickham, Hadley. Tidy data. Article licensed CC BY (Creative Commons Attribution, per the journal’s article page). Quoted from the article PDF. Section 2.2: several types of observation in one study (the allergy trial example). https://www.jstatsoft.org/article/view/v059i10 (accessed 2026-10-02).
  152. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 5 “Data tidying”, 5.2 “Tidy data”: the book’s own third rule, which differs from Wickham 2014. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  153. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. Section 6 “Put Just One Thing in a Cell”, first paragraph. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  154. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. Section 7 “Make it a Rectangle”, first paragraph. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  155. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. Section 10 “Do Not Use Font Color or Highlighting as Data”, last paragraph. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  156. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. Section 6, second paragraph: units out of the cell. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  157. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. Help page “penguins_raw” (palmerpenguins 0.1.1), Description and the Individual ID entry. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  158. Wickham, Hadley. Tidy data. Article licensed CC BY (Creative Commons Attribution, per the journal’s article page). Quoted from the article PDF. Section 2.2 “Data semantics”, second paragraph: defining variables in general. https://www.jstatsoft.org/article/view/v059i10 (accessed 2026-10-02).
  159. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. Section 9 “No Calculations in the Raw Data Files”, first paragraph. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  160. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. Help page “penguins_raw” (palmerpenguins 0.1.1), Format, the Individual ID entry. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  161. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 7 “Data import”, 7.2 “Reading data from a file”, first paragraph: what a CSV file is. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  162. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 7, 7.3 “Controlling column types”, first paragraph. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  163. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. Section 13 “Save the Data in Plain Text Files”, second paragraph. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  164. Wickham, Hadley and Hester, Jim and Bryan, Jennifer. readr: Read Rectangular Text Data, version 2.1.5: help pages. 2024. Help page “read_delim” (readr 2.1.5), Arguments, col_types: types guessed from a sample of rows. R package, CRAN. https://CRAN.R-project.org/package=readr (accessed 2026-10-02).
  165. Wickham, Hadley and Hester, Jim and Bryan, Jennifer. readr: Read Rectangular Text Data, version 2.1.5: help pages. 2024. Help page “read_delim” (readr 2.1.5), Arguments, col_types: the message printed when types are guessed. R package, CRAN. https://CRAN.R-project.org/package=readr (accessed 2026-10-02).
  166. Wickham, Hadley and Hester, Jim and Bryan, Jennifer. readr: Read Rectangular Text Data, version 2.1.5: help pages. 2024. Help page “read_delim” (readr 2.1.5), Usage, the default of na. R package, CRAN. https://CRAN.R-project.org/package=readr (accessed 2026-10-02).
  167. Wickham, Hadley and Hester, Jim and Bryan, Jennifer. readr: Read Rectangular Text Data, version 2.1.5: help pages. 2024. Help page “read_delim” (readr 2.1.5), Arguments, na. R package, CRAN. https://CRAN.R-project.org/package=readr (accessed 2026-10-02).
  168. Wickham, Hadley and Hester, Jim and Bryan, Jennifer. readr: Read Rectangular Text Data, version 2.1.5: help pages. 2024. Help page “read_delim” (readr 2.1.5), Value. R package, CRAN. https://CRAN.R-project.org/package=readr (accessed 2026-10-02).
  169. Wickham, Hadley and Hester, Jim and Bryan, Jennifer. readr: Read Rectangular Text Data, version 2.1.5: help pages. 2024. Help page “read_delim” (readr 2.1.5), Arguments, file: literal data. R package, CRAN. https://CRAN.R-project.org/package=readr (accessed 2026-10-02).
  170. Wickham, Hadley and Bryan, Jennifer. readxl: Read Excel Files, version 1.4.3: help pages. 2023. Help page “read_excel” (readxl 1.4.3), Description and Arguments sheet and range. R package, CRAN. https://CRAN.R-project.org/package=readxl (accessed 2026-10-02).
  171. Wickham, Hadley and Bryan, Jennifer. readxl: Read Excel Files, version 1.4.3: help pages. 2023. Help page “read_excel” (readxl 1.4.3), Arguments, range. R package, CRAN. https://CRAN.R-project.org/package=readxl (accessed 2026-10-02).
  172. Wickham, Hadley and Miller, Evan and Smith, Danny. haven: Import and Export ‘SPSS’, ‘Stata’ and ‘SAS’ Files, version 2.5.4: help pages. 2023. Help page “read_spss” (haven 2.5.4), Description. R package, CRAN. https://CRAN.R-project.org/package=haven (accessed 2026-10-02).
  173. Wickham, Hadley and Miller, Evan and Smith, Danny. haven: Import and Export ‘SPSS’, ‘Stata’ and ‘SAS’ Files, version 2.5.4: help pages. 2023. Help page “read_spss” (haven 2.5.4), Arguments, user_na. R package, CRAN. https://CRAN.R-project.org/package=haven (accessed 2026-10-02).
  174. Wickham, Hadley and Miller, Evan and Smith, Danny. haven: Import and Export ‘SPSS’, ‘Stata’ and ‘SAS’ Files, version 2.5.4: help pages. 2023. Help page “read_xpt” (haven 2.5.4), title, and Value: variable labels. R package, CRAN. https://CRAN.R-project.org/package=haven (accessed 2026-10-02).
  175. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 20 “Spreadsheets”, 20.2.3, after the reading examples: look at a copy, read the original. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  176. National Center for Health Statistics. National Health and Nutrition Examination Survey, August 2021–August 2023: Body Measures (BMX_L) and Demographic Variables and Sample Weights (DEMO_L), Data Files and Documentation. 2024. BMX_L codebook (block 3), “Body Mass Index (BMXBMI)”. NCHS. https://wwwn.cdc.gov/nchs/nhanes/search/datapage.aspx?Component=Examination&Cycle=2021-2023 (accessed 2026-10-02).
  177. National Center for Health Statistics. National Health and Nutrition Examination Survey, August 2021–August 2023: Body Measures (BMX_L) and Demographic Variables and Sample Weights (DEMO_L), Data Files and Documentation. 2024. BMX_L codebook (block 3), “Sample weights”. NCHS. https://wwwn.cdc.gov/nchs/nhanes/search/datapage.aspx?Component=Examination&Cycle=2021-2023 (accessed 2026-10-02).
  178. National Center for Health Statistics. National Health and Nutrition Examination Survey, August 2021–August 2023: Body Measures (BMX_L) and Demographic Variables and Sample Weights (DEMO_L), Data Files and Documentation. 2024. figures quoted in the text. NCHS. https://wwwn.cdc.gov/nchs/nhanes/search/datapage.aspx?Component=Examination&Cycle=2021-2023 (accessed 2026-10-02).
  179. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. section 8 “Create a Data Dictionary”, first paragraph. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  180. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. section 8 “Create a Data Dictionary”: the exact name, and the units. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  181. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. section 8 “Create a Data Dictionary”, last paragraph: allowed values. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  182. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. section 8 “Create a Data Dictionary”: metadata and the ReadMe file. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  183. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Collaboration, 3a “Create an overview of your project”: what a README holds. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  184. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Data management, 1a “Save the raw data”: record how the raw data were obtained. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  185. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Project organization, 4c: raw data and metadata in a data directory. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  186. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Collaboration, 3d “Make the license explicit”. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  187. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Collaboration, 3d: the licences recommended, CC-0 among them. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  188. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Collaboration, 3e “Make the project citable”. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  189. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Data management, 1c “Create the data you wish to see in the world”: variable names and codes. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  190. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 1 “For Every Result, Keep Track of How It Was Produced”, minimum. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  191. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. help page “penguins_raw” (palmerpenguins 0.1.1), Format: the 17 variables. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  192. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. help page “penguins_raw”, Format: Individual ID. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  193. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. help page “penguins_raw”, Format: Culmen Length and Body Mass, with their units. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  194. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. DESCRIPTION file (palmerpenguins 0.1.1): licence. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  195. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. help page “penguins_raw”, Source: who collected the data, and the first publication. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  196. Wickham, Hadley and Hester, Jim and Bryan, Jennifer. readr: Read Rectangular Text Data, version 2.1.5: help pages. 2024. vignette “readr” (readr 2.1.5), column specification: spec(). R package, CRAN. https://CRAN.R-project.org/package=readr (accessed 2026-10-02).
  197. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “n_distinct” (dplyr 1.1.4), Description. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  198. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “count” (dplyr 1.1.4), Description. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  199. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “filter” (dplyr 1.1.4), Arguments, “…”: columns named as variables of the data. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  200. R Core Team. R 4.3.3, package base: help pages. 2024. help page “library” (base 4.3.3), Arguments: warn.conflicts. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  201. Wickham, Hadley and Hester, Jim and Bryan, Jennifer. readr: Read Rectangular Text Data, version 2.1.5: help pages. 2024. vignette “readr” (readr 2.1.5), Available column specifications, and Date/times: the default date format. R package, CRAN. https://CRAN.R-project.org/package=readr (accessed 2026-10-02).
  202. Wickham, Hadley and Hester, Jim and Bryan, Jennifer. readr: Read Rectangular Text Data, version 2.1.5: help pages. 2024. help page “read_delim” (readr 2.1.5), Arguments: quote. R package, CRAN. https://CRAN.R-project.org/package=readr (accessed 2026-10-02).
  203. Horst, Allison Marie and Hill, Alison Presmanes and Gorman, Kristen B. palmerpenguins: Palmer Archipelago (Antarctica) Penguin Data. 2020. DESCRIPTION file (palmerpenguins 0.1.1), Description: LTER expanded. CRAN. https://allisonhorst.github.io/palmerpenguins/ (accessed 2026-10-02).
  204. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “filter” (dplyr 1.1.4), Description: rows kept, and NA dropped. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  205. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “filter” (dplyr 1.1.4), Arguments, “…”: several conditions combined with &. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  206. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “filter” (dplyr 1.1.4), “Useful filter functions”. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  207. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “select” (dplyr 1.1.4), Value: rows unaffected, renaming inside select. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  208. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “select” (dplyr 1.1.4), Overview of selection features: starts_with(). R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  209. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “rename” (dplyr 1.1.4), Description and Value. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  210. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “arrange” (dplyr 1.1.4), Details, Missing values. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  211. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “desc” (dplyr 1.1.4), Description. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  212. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 3 “Data transformation”, 3.1.3 dplyr basics: what the verbs have in common. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  213. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 3 “Data transformation”, 3.2.1 filter(): the input is not changed. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  214. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 3 “Data transformation”, 3.2.1 filter(): %in%. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  215. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 3 “Data transformation”, 3.1.3 dplyr basics: the pipe read as “then”. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  216. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 7 “Data import”, 7.2: column names with spaces need backticks. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  217. The tidyverse team. The tidyverse style guide. 2.1 Object names: snake case. Online book. https://style.tidyverse.org/ (accessed 2026-10-02).
  218. The tidyverse team. The tidyverse style guide. 4 Pipes: one step per line. Online book. https://style.tidyverse.org/ (accessed 2026-10-02).
  219. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 3 “Data transformation”, 3.1.3 dplyr basics: the functions called verbs. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  220. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 3 “Data transformation”, 3.2.2 Common mistakes: “or” written as in English. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  221. Tidyverse team. Changelogs of ggplot2, dplyr, readr and tidyr: entries after ggplot2 3.4.4, dplyr 1.1.4, readr 2.1.5 and tidyr 1.3.1. 2026. dplyr 1.2.0 (CRAN release 2026-02-03), New features: filter_out(). tidyverse.org. https://ggplot2.tidyverse.org/news/ (accessed 2026-10-02).
  222. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “mutate” (dplyr 1.1.4), Description. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  223. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “mutate” (dplyr 1.1.4), Value: rows. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  224. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “mutate” (dplyr 1.1.4), Arguments, .before, .after: where new columns go. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  225. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “if_else” (dplyr 1.1.4), Value. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  226. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “case_when” (dplyr 1.1.4), Description: cases in order, first match. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  227. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “case_when” (dplyr 1.1.4), Arguments, .default: NA conditions, and no default. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  228. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “rename” (dplyr 1.1.4), Description: rename_with(). R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  229. R Core Team. R 4.3.3, package base: help pages. 2024. help page “Round” (base 4.3.3), Description: round(). R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  230. R Core Team. R 4.3.3, package base: help pages. 2024. help page “Round” (base 4.3.3), Details: rounding off a 5, and the represented number. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  231. Wickham, Hadley. stringr: Simple, Consistent Wrappers for Common String Operations, version 1.5.1: help pages. 2023. help page “str_trim” (stringr 1.5.1), Description. R package, CRAN. https://CRAN.R-project.org/package=stringr (accessed 2026-10-02).
  232. Wickham, Hadley. stringr: Simple, Consistent Wrappers for Common String Operations, version 1.5.1: help pages. 2023. help page “case” (stringr 1.5.1), Description: str_to_lower(). R package, CRAN. https://CRAN.R-project.org/package=stringr (accessed 2026-10-02).
  233. International Institute for Population Sciences and Ministry of Health and Family Welfare. National Family Health Survey (NFHS-5), 2019-21: India Fact Sheet. 2021. Key indicators, row 87: the lower BMI cut-point and its boundary. https://dhsprogram.com/pubs/pdf/OF43/India_National_Fact_Sheet.pdf (accessed 2026-09-24).
  234. International Institute for Population Sciences and Ministry of Health and Family Welfare. National Family Health Survey (NFHS-5), 2019-21: India Fact Sheet. 2021. Key indicators, row 89: the upper BMI cut-point and its boundary. https://dhsprogram.com/pubs/pdf/OF43/India_National_Fact_Sheet.pdf (accessed 2026-09-24).
  235. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “case_when” (dplyr 1.1.4), Usage: .default after the cases. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  236. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “rename” (dplyr 1.1.4), Arguments, .fn; Examples. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  237. R Core Team. R 4.3.3, package base: help pages. 2024. help page “NA” (base 4.3.3), Title and Description. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  238. R Core Team. R 4.3.3, package base: help pages. 2024. help page “NA” (base 4.3.3), Details: arithmetic on NA. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  239. R Core Team. R 4.3.3, package base: help pages. 2024. help page “NA” (base 4.3.3), Value: is.na() on a data frame. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  240. Venables, W. N. and Smith, D. M. and R Core Team. An Introduction to R: Notes on R, a Programming Environment for Data Analysis and Graphics. 2026. section 2.4 “Logical vectors” (heading lost in extraction), last paragraph: TRUE and FALSE in arithmetic. https://cran.r-project.org/doc/manuals/r-release/R-intro.html (accessed 2026-10-02).
  241. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 18 “Missing values”, 18.2.2 Fixed values: special values that stand for missing. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  242. The Carpentries. Data Organization in Spreadsheets for Ecologists. 2026. ep. 02 “Formatting problems”, Using problematic null values. Data Carpentry lesson (spreadsheet-ecology-lesson). https://datacarpentry.github.io/spreadsheet-ecology-lesson/ (accessed 2026-10-02).
  243. Wickham, Hadley and Vaughan, Davis and Girlich, Maximilian. tidyr: Tidy Messy Data, version 1.3.1: help pages. 2024. help page “drop_na” (tidyr 1.3.1), Description. R package, CRAN. https://CRAN.R-project.org/package=tidyr (accessed 2026-10-02).
  244. Wickham, Hadley and Vaughan, Davis and Girlich, Maximilian. tidyr: Tidy Messy Data, version 1.3.1: help pages. 2024. help page “drop_na” (tidyr 1.3.1), Arguments, …: no columns named means all columns. R package, CRAN. https://CRAN.R-project.org/package=tidyr (accessed 2026-10-02).
  245. Wickham, Hadley and Vaughan, Davis and Girlich, Maximilian. tidyr: Tidy Messy Data, version 1.3.1: help pages. 2024. help page “drop_na” (tidyr 1.3.1), Details: complete rows. R package, CRAN. https://CRAN.R-project.org/package=tidyr (accessed 2026-10-02).
  246. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “summarise” (dplyr 1.1.4), Description and Arguments, …: one row, and sum(is.na(y)) as a summary. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  247. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “context” (dplyr 1.1.4), Description: n(). R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  248. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 16 “Factors”, 16.1 Introduction: what a factor is for. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  249. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 16, 16.2 Factor basics: values not in the levels. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  250. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 16, 16.2 Factor basics: levels taken from the data. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  251. Wickham, Hadley. forcats: Tools for Working with Categorical Variables (Factors), version 1.0.0: help pages. 2023. help page “fct_recode” (forcats 1.0.0), Arguments: new name on the left, old on the right. R package, CRAN. https://CRAN.R-project.org/package=forcats (accessed 2026-10-02).
  252. Wickham, Hadley. forcats: Tools for Working with Categorical Variables (Factors), version 1.0.0: help pages. 2023. help page “fct_relevel” (forcats 1.0.0), Arguments, …: levels not mentioned. R package, CRAN. https://CRAN.R-project.org/package=forcats (accessed 2026-10-02).
  253. Wickham, Hadley. forcats: Tools for Working with Categorical Variables (Factors), version 1.0.0: help pages. 2023. help page “fct_inorder” (forcats 1.0.0), Description: fct_infreq(). R package, CRAN. https://CRAN.R-project.org/package=forcats (accessed 2026-10-02).
  254. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “count” (dplyr 1.1.4), Arguments, .drop. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  255. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. section 2 “Be Consistent”, consistent codes for categorical variables (p. 2). https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  256. Spinu, Vitalie and Grolemund, Garrett and Wickham, Hadley. lubridate: Make Dealing with Dates a Little Easier, version 1.9.3: help pages. 2023. help page “ymd” (lubridate 1.9.3), Description: text to Date, any separator. R package, CRAN. https://CRAN.R-project.org/package=lubridate (accessed 2026-10-02).
  257. Spinu, Vitalie and Grolemund, Garrett and Wickham, Hadley. lubridate: Make Dealing with Dates a Little Easier, version 1.9.3: help pages. 2023. help page “ymd” (lubridate 1.9.3), Value: a Date when no time zone is given. R package, CRAN. https://CRAN.R-project.org/package=lubridate (accessed 2026-10-02).
  258. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 17 “Dates and times”, 17.2.2 From strings: the function name follows the order of the parts. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  259. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 17, 17.2.1 During import: readr recognises ISO 8601 dates. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  260. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 17, 17.2.4 From other types: offsets in days from 1970-01-01. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  261. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 17, 17.4.1 Durations: subtracting two dates. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  262. The Carpentries. Data Organization in Spreadsheets for Ecologists. 2026. ep. 03 “Dates as data”, Dates stored as integers: the serial number of 2 July 2014. Data Carpentry lesson (spreadsheet-ecology-lesson). https://datacarpentry.github.io/spreadsheet-ecology-lesson/ (accessed 2026-10-02).
  263. The Carpentries. Data Organization in Spreadsheets for Ecologists. 2026. ep. 03 “Dates as data”, Preferred date format: the 1904 date system. Data Carpentry lesson (spreadsheet-ecology-lesson). https://datacarpentry.github.io/spreadsheet-ecology-lesson/ (accessed 2026-10-02).
  264. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. section 4 “Write Dates as YYYY-MM-DD” (p. 3): the ISO 8601 recommendation. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  265. Broman, Karl W and Woo, Kara H. Data organization in spreadsheets. 2018. section 4 “Write Dates as YYYY-MM-DD” (p. 3): Excel stores dates as numbers. https://doi.org/10.1080/00031305.2017.1375989 (accessed 2026-10-02).
  266. Ziemann, Mark and Eren, Yotam and El-Osta, Assam. Gene name errors are widespread in the scientific literature. PMID 27552985, PMC4994289. Open access under CC BY 4.0. Quoted from the PMC open-access text. Background, first paragraph: SEPT2 converted to a full date. https://pmc.ncbi.nlm.nih.gov/articles/PMC4994289/ (accessed 2026-10-02).
  267. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 17, 17.4.1 Durations: the average year. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  268. R Core Team. R 4.3.3, package base: help pages. 2024. help page “Round” (base 4.3.3), Description: floor(). R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  269. The Carpentries. Data Organization in Spreadsheets for Ecologists. 2026. figures quoted in the text. Data Carpentry lesson (spreadsheet-ecology-lesson). https://datacarpentry.github.io/spreadsheet-ecology-lesson/ (accessed 2026-10-02).
  270. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “summarise” (dplyr 1.1.4), Description: one row per group. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  271. R Core Team. R 4.3.3, package stats: help pages. 2024. help page “sd” (stats 4.3.3), Details: the denominator. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  272. R Core Team. R 4.3.3, package stats: help pages. 2024. help page “quantile” (stats 4.3.3), Types: nine algorithms, and the default. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  273. R Core Team. R 4.3.3, package stats: help pages. 2024. help page “quantile” (stats 4.3.3), Types: type 6 and the software that uses it. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  274. R Core Team. R 4.3.3, package stats: help pages. 2024. help page “quantile” (stats 4.3.3), Arguments, x: missing values. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  275. R Core Team. R 4.3.3, package base: help pages. 2024. help page “mean” (base 4.3.3), Arguments, na.rm (median: help page “median” (stats 4.3.3), Value). R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  276. R Core Team. R 4.3.3, package stats: help pages. 2024. help page “IQR” (stats 4.3.3), Details: quartiles from quantile(). R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  277. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “group_by” (dplyr 1.1.4), Description. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  278. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “summarise” (dplyr 1.1.4), Arguments, .groups: what is dropped by default. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  279. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “summarise” (dplyr 1.1.4), Arguments, .by. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  280. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “group_by” (dplyr 1.1.4), Ordering: groups in ascending order. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  281. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 3, section 3.6 “Case study: aggregates and sample size”, first sentence. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  282. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 7, section 7.5 “Writing to a file”, first sentence: write_csv(). https://r4ds.hadley.nz/ (accessed 2026-10-02).
  283. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 9 “Connect Textual Statements to Underlying Results”, last paragraph. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  284. Wickham, Hadley and Vaughan, Davis and Girlich, Maximilian. tidyr: Tidy Messy Data, version 1.3.1: help pages. 2024. help page “pivot_longer” (tidyr 1.3.1), Description. R package, CRAN. https://CRAN.R-project.org/package=tidyr (accessed 2026-10-02).
  285. Wickham, Hadley and Vaughan, Davis and Girlich, Maximilian. tidyr: Tidy Messy Data, version 1.3.1: help pages. 2024. help page “pivot_wider” (tidyr 1.3.1), Description. R package, CRAN. https://CRAN.R-project.org/package=tidyr (accessed 2026-10-02).
  286. Wickham, Hadley and Vaughan, Davis and Girlich, Maximilian. tidyr: Tidy Messy Data, version 1.3.1: help pages. 2024. help page “pivot_longer” (tidyr 1.3.1), Arguments, names_prefix. R package, CRAN. https://CRAN.R-project.org/package=tidyr (accessed 2026-10-02).
  287. Wickham, Hadley and Vaughan, Davis and Girlich, Maximilian. tidyr: Tidy Messy Data, version 1.3.1: help pages. 2024. help page “pivot_wider” (tidyr 1.3.1), Arguments, values_fill. R package, CRAN. https://CRAN.R-project.org/package=tidyr (accessed 2026-10-02).
  288. Wickham, Hadley and Vaughan, Davis and Girlich, Maximilian. tidyr: Tidy Messy Data, version 1.3.1: help pages. 2024. help page “pivot_wider” (tidyr 1.3.1), Arguments, names_from and values_from; id_cols. R package, CRAN. https://CRAN.R-project.org/package=tidyr (accessed 2026-10-02).
  289. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “mutate-joins” (dplyr 1.1.4), Description: what a mutating join does, and left_join(). R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  290. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 19, section 19.3.1 “Mutating joins”: no match gives missing values. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  291. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. vignette “two-table” (dplyr 1.1.4), “Observations”: duplicate keys add rows. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  292. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “filter-joins” (dplyr 1.1.4), Description: anti_join(). R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  293. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “mutate-joins” (dplyr 1.1.4), Arguments, by: the natural join. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  294. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “mutate-joins” (dplyr 1.1.4), Arguments, relationship. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  295. National Center for Health Statistics. National Health and Nutrition Examination Survey, August 2021–August 2023: Body Measures (BMX_L) and Demographic Variables and Sample Weights (DEMO_L), Data Files and Documentation. 2024. BMX_L documentation, “Sample weights” paragraph (printed codebook). NCHS. https://wwwn.cdc.gov/nchs/nhanes/search/datapage.aspx?Component=Examination&Cycle=2021-2023 (accessed 2026-10-02).
  296. National Center for Health Statistics. National Health and Nutrition Examination Survey, August 2021–August 2023: Body Measures (BMX_L) and Demographic Variables and Sample Weights (DEMO_L), Data Files and Documentation. 2024. DEMO_L documentation, analytic notes on RIDSTATR (printed codebook). NCHS. https://wwwn.cdc.gov/nchs/nhanes/search/datapage.aspx?Component=Examination&Cycle=2021-2023 (accessed 2026-10-02).
  297. National Center for Health Statistics. National Health and Nutrition Examination Survey, August 2021–August 2023: Body Measures (BMX_L) and Demographic Variables and Sample Weights (DEMO_L), Data Files and Documentation. 2024. DEMO_L codebook, RIAGENDR code table. NCHS. https://wwwn.cdc.gov/nchs/nhanes/search/datapage.aspx?Component=Examination&Cycle=2021-2023 (accessed 2026-10-02).
  298. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “ggplot” (ggplot2 3.4.4), Description. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  299. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “ggplot” (ggplot2 3.4.4), Details: adding with a plus sign. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  300. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “aes” (ggplot2 3.4.4), Description. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  301. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 1, section 1.2.3 “Creating a ggplot”: what a geom is. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  302. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “geom_histogram” (ggplot2 3.4.4), Description. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  303. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “geom_histogram” (ggplot2 3.4.4), Arguments, bins: the default. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  304. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “geom_histogram” (ggplot2 3.4.4), Usage of stat_bin(): the default for closed. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  305. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “geom_histogram” (ggplot2 3.4.4), Arguments, center, boundary. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  306. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “geom_boxplot” (ggplot2 3.4.4), Summary statistics: hinges. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  307. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “geom_boxplot” (ggplot2 3.4.4), Summary statistics: whiskers and outlying points. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  308. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 1, section 1.5.1, the note on terminology: mapping against setting. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  309. The Carpentries. R for Reproducible Scientific Analysis. 2026. Ep. 08 “Creating publication-quality graphics with ggplot2”, tip “Setting an aesthetic to a value instead of a mapping”. Software Carpentry lesson (r-novice-gapminder). https://swcarpentry.github.io/r-novice-gapminder/ (accessed 2026-10-02).
  310. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “facet_wrap” (ggplot2 3.4.4), Description. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  311. Wickham, Hadley and Chang, Winston and Henry, Lionel and Pedersen, Thomas Lin and Takahashi, Kohske and Wilke, Claus and Woo, Kara and Yutani, Hiroaki and Dunnington, Dewey. ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics, version 3.4.4: help pages. 2023. help page “ggsave” (ggplot2 3.4.4), Arguments, width, height, units. R package, CRAN. https://CRAN.R-project.org/package=ggplot2 (accessed 2026-10-02).
  312. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. ch. 1, section 1.6 “Saving your plots”: give the size. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  313. Tidyverse team. Changelogs of ggplot2, dplyr, readr and tidyr: entries after ggplot2 3.4.4, dplyr 1.1.4, readr 2.1.5 and tidyr 1.3.1. 2026. ggplot2 3.5.0, Bug fixes: ggsave() and directories. tidyverse.org. https://ggplot2.tidyverse.org/news/ (accessed 2026-10-02).
  314. Tidyverse team. Changelogs of ggplot2, dplyr, readr and tidyr: entries after ggplot2 3.4.4, dplyr 1.1.4, readr 2.1.5 and tidyr 1.3.1. 2026. ggplot2 4.0.0, Breaking changes: default bin boundary. tidyverse.org. https://ggplot2.tidyverse.org/news/ (accessed 2026-10-02).
  315. Tidyverse team. Changelogs of ggplot2, dplyr, readr and tidyr: entries after ggplot2 3.4.4, dplyr 1.1.4, readr 2.1.5 and tidyr 1.3.1. 2026. ggplot2 4.0.1, bug fix: stat_bin(boundary) was ignored. tidyverse.org. https://ggplot2.tidyverse.org/news/ (accessed 2026-10-02).
  316. Tidyverse team. Changelogs of ggplot2, dplyr, readr and tidyr: entries after ggplot2 3.4.4, dplyr 1.1.4, readr 2.1.5 and tidyr 1.3.1. 2026. ggplot2 4.0.3: geom_boxplot() gains quantile.type, default 7. tidyverse.org. https://ggplot2.tidyverse.org/news/ (accessed 2026-10-02).
  317. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 7 “Always Store Raw Data behind Plots”, on histograms. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  318. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 7 “Always Store Raw Data behind Plots”, on keeping the plotting code. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  319. R Core Team. R 4.3.3, package base: help pages. 2024. help page “stopifnot” (base 4.3.3), Description. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  320. R Core Team. R 4.3.3, package base: help pages. 2024. help page “stopifnot” (base 4.3.3), Details: evaluation stops at the first failure. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  321. R Core Team. R 4.3.3, package base: help pages. 2024. help page “stopifnot” (base 4.3.3), Details: the conceptual equivalent, in which a missing value fails. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  322. R Core Team. R 4.3.3, package base: help pages. 2024. help page “stopifnot” (base 4.3.3), Arguments, …: names replace the message. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  323. R Core Team. R 4.3.3, package base: help pages. 2024. help page “stopifnot” (base 4.3.3), Value. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  324. Wickham, Hadley and François, Romain and Henry, Lionel and Müller, Kirill and Vaughan, Davis. dplyr: A Grammar of Data Manipulation, version 1.1.4: help pages. 2023. help page “mutate-joins” (dplyr 1.1.4), Arguments, relationship: the default warns only on many-to-many. R package, CRAN. https://CRAN.R-project.org/package=dplyr (accessed 2026-10-02).
  325. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Data management, 1a “Save the raw data”. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  326. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Data management, 1e “Record all the steps used to process data”. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  327. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Data management, 1f “use a unique identifier for every record”. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  328. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 2 “Avoid Manual Data Manipulation Steps”, first paragraph. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  329. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 5 “Record All Intermediate Results”, first paragraph: looking at intermediate results. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  330. The Carpentries. Data Organization in Spreadsheets for Ecologists. 2026. Episode 04 “Quality Assurance”, first paragraph. Data Carpentry lesson (spreadsheet-ecology-lesson). https://datacarpentry.github.io/spreadsheet-ecology-lesson/ (accessed 2026-10-02).
  331. Peng, Roger D. Reproducible research in computational science. 2011. Body, second paragraph: replication as the ultimate standard. https://pmc.ncbi.nlm.nih.gov/articles/PMC3383002/ (accessed 2026-10-02).
  332. Peng, Roger D. Reproducible research in computational science. 2011. Body, third paragraph: what reproducibility requires, and how it falls short of replication. https://pmc.ncbi.nlm.nih.gov/articles/PMC3383002/ (accessed 2026-10-02).
  333. Peng, Roger D. Reproducible research in computational science. 2011. Body, third paragraph: the spectrum (Fig. 1). https://pmc.ncbi.nlm.nih.gov/articles/PMC3383002/ (accessed 2026-10-02).
  334. Peng, Roger D. Reproducible research in computational science. 2011. Body, seventh paragraph: reproducible is not correct. https://pmc.ncbi.nlm.nih.gov/articles/PMC3383002/ (accessed 2026-10-02).
  335. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Implementation and Methods, first paragraph: the sample. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  336. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Background, second paragraph: what a replication package is. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  337. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 4: three R versions, clean environment. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  338. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 4: the time allowed. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  339. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 4: time-limit results excluded. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  340. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 4, combining the three versions: success if any version succeeds. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  341. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Implementation and Methods, Code cleaning: what the cleaning did. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  342. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Abstract: the two failure figures. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  343. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 4, results table, row “Success rate” (columns: without code cleaning, with code cleaning, best of both). https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  344. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Implementation and Methods, Data collection workflow: cleaning aimed at common errors. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  345. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 5: cleaning fixed every setwd error. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  346. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 5: library errors. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  347. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 5: errors left after cleaning, versions. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  348. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 5: errors left after cleaning, paths and missing objects. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  349. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Limitations of the Study, first paragraph: re-execution necessary, not sufficient. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  350. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 7: journal policy and re-execution. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  351. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, RQ 9: most datasets labelled social science. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  352. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Limitations of the Study, last paragraph: one source. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  353. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. figures quoted in the text. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  354. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6 “Workflow: scripts and projects”, 6.2.1 “What is the source of truth?”, first paragraph. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  355. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6, 6.2.1, the pair of keyboard shortcuts: restart R, then re-run the script. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  356. Wickham, Hadley and Çetinkaya-Rundel, Mine and Grolemund, Garrett. R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. 2023. Ch. 6, 6.2.1, last paragraph: restarting regularly for a clean slate. https://r4ds.hadley.nz/ (accessed 2026-10-02).
  357. R Core Team. R 4.3.3, package utils: help pages. 2024. Help page “Rscript” (utils 4.3.3), Details: the options always supplied. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  358. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “source” (base 4.3.3), Arguments: local. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  359. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “Random” (base 4.3.3), Description: set.seed. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  360. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “Random” (base 4.3.3), Examples: the same seed gives the same numbers. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  361. R Core Team. R 4.3.3, package base: help pages. 2024. Help page “Random” (base 4.3.3), Details: sample.kind, the default changed in R 3.6.0. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  362. R Core Team. R 4.3.3, package utils: help pages. 2024. Help page “sessionInfo” (utils 4.3.3), Description. R Foundation for Statistical Computing. https://www.R-project.org/ (accessed 2026-10-02).
  363. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 6: For Analyses That Include Randomness, Note Underlying Random Seeds. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  364. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 3: Archive the Exact Versions of All External Programs Used, last sentence. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  365. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 1: For Every Result, Keep Track of How It Was Produced, second paragraph. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  366. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 9: Connect Textual Statements to Underlying Results, last paragraph. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  367. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Best Practices and Recommendations, first recommendation for researchers who use R. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  368. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, after Fig. 8: errors left after code cleaning. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  369. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Results, after Fig. 8: the “object not found” error. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  370. Trisovic, Ana and Lau, Matthew K and Pasquier, Thomas and Crosas, Mercè. A large-scale study on research code quality and execution. PMID 35190569, PMC8861064. Open access under CC BY 4.0. Quoted from the PMC open-access text. Abstract: the share of R files that stopped with an error. https://pmc.ncbi.nlm.nih.gov/articles/PMC8861064/ (accessed 2026-10-02).
  371. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Project organization, 4d: the controller or driver script. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  372. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Keeping track of changes, second paragraph: version control. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  373. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Data management, 1e “Record all the steps used to process data”, second paragraph. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  374. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Project organization, 4d: a single controller script for a small project. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  375. Wilson, Greg and Bryan, Jennifer and Cranston, Karen and Kitzes, Justin and Nederbragt, Lex and Teal, Tracy K. Good enough practices in scientific computing. 2017. Collaboration, 3a “Create an overview of your project”: the README. https://pmc.ncbi.nlm.nih.gov/articles/PMC5480810/ (accessed 2026-10-02).
  376. Sandve, Geir Kjetil and Nekrutenko, Anton and Taylor, James and Hovig, Eivind. Ten simple rules for reproducible computational research. 2013. Rule 2: Avoid Manual Data Manipulation Steps, first sentence. https://pmc.ncbi.nlm.nih.gov/articles/PMC3812051/ (accessed 2026-10-02).
  377. National Center for Health Statistics. National Health and Nutrition Examination Survey, August 2021–August 2023: Body Measures (BMX_L) and Demographic Variables and Sample Weights (DEMO_L), Data Files and Documentation. 2024. Block 3, BMX_L documentation, Analytic Notes: sample weights. NCHS. https://wwwn.cdc.gov/nchs/nhanes/search/datapage.aspx?Component=Examination&Cycle=2021-2023 (accessed 2026-10-02).