| Type: | Package |
| Title: | Companion Package for 'Reproducible Research Using R' |
| Version: | 0.1.1 |
| Description: | Provides teaching datasets and helper functions to support the open educational resource Martinez (2026) "Reproducible Research Using R" <doi:10.5281/zenodo.19136755>. The package includes datasets used throughout the book and utilities to list and copy chapter scripts shipped with the package. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| LazyData: | true |
| Depends: | R (≥ 3.5.0) |
| Suggests: | rstudioapi |
| URL: | https://martinezc1-reproducible-research-using-r.share.connect.posit.cloud/, https://github.com/martinezc1/reproresearchR |
| BugReports: | https://github.com/martinezc1/reproresearchR/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-03-20 23:09:45 UTC; christianmartinez |
| Author: | Christian Martinez [aut, cre] |
| Maintainer: | Christian Martinez <c.martinez0@outlook.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-03-25 20:50:06 UTC |
Copy or run a textbook chapter script
Description
Copy or run a textbook chapter script
Usage
chapter_script(
chapter,
type = c("full", "helper"),
dest,
run = FALSE,
overwrite = FALSE,
open = FALSE
)
Arguments
chapter |
Chapter number (e.g., 1, 2, 3). |
type |
Script type: "full" or "helper". |
dest |
Directory to copy the script into. |
run |
If TRUE, source() the script after copying. |
overwrite |
If TRUE, overwrite an existing file. |
open |
If TRUE, attempt to open the copied script in RStudio. |
Value
Path to the copied script (invisibly if run = TRUE).
Examples
tmp <- tempdir()
chapter_script(3, "helper", dest = tmp, overwrite = TRUE)
tmp <- tempdir()
chapter_script(3, "helper", dest = tmp, open = TRUE, overwrite = TRUE)
Exam data dataset
Description
A teaching dataset used in *Reproducible Research Using R*. This dataset is used for examples involving descriptive statistics, visualization, correlation, and regression.
Usage
exam_data
Format
A data frame with 100 rows and 5 variables:
- Student Name
Student identifier.
- Studying Hours
Number of hours spent studying.
- Exam Score
Exam score.
- Anxiety Score
Self-reported anxiety score.
- First Generation College Student
Whether the student is a first-generation college student (Yes/No).
Source
Created for the textbook *Reproducible Research Using R*.
Infection treatments dataset
Description
A teaching dataset used in *Reproducible Research Using R*. This dataset is used for examples involving categorical data analysis and group comparisons.
Usage
infection_treatments
Format
A data frame with 150 rows and 2 variables:
- Infection
Type of infection.
- Treatment
Treatment administered.
Source
Created for the textbook *Reproducible Research Using R*.
List available chapter scripts included with the package
Description
List available chapter scripts included with the package
Usage
list_chapters()
Value
A data frame with columns: chapter, type, file.
Examples
list_chapters()
Pizza prices dataset
Description
A teaching dataset used in *Reproducible Research Using R*. This dataset is primarily used for examples involving data visualization and linear regression.
Usage
pizza_prices
Format
A data frame with 156 rows and 3 variables:
- Week
Week number of observation.
- Total Volume
Total number of pizzas sold in that week.
- Total Price
Total revenue generated from pizza sales in that week.
Source
Created for the textbook *Reproducible Research Using R*.