| Type: | Package |
| Title: | Companion Package for 'Reproducible Research Using R' |
| Version: | 0.1.2 |
| 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 |
| 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, https://martinezc1.github.io/reproresearchR/ |
| BugReports: | https://github.com/martinezc1/reproresearchR/issues |
| Config/roxygen2/version: | 8.1.0 |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-09-07 00:48:59 UTC; christianmartinez |
| Author: | Christian Martinez
|
| Maintainer: | Christian Martinez <c.martinez0@outlook.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-09-07 02:30:02 UTC |
Copy Chapter Materials
Description
Copies all learning materials associated with a textbook chapter into a local folder. This includes the chapter Quarto file, helper script, and completed script.
Usage
chapter_materials(chapter, path = ".", overwrite = FALSE)
Arguments
chapter |
Chapter number. |
path |
Directory where the chapter folder should be created. Defaults to the current working directory. |
overwrite |
Logical. Should existing files be overwritten? Defaults to FALSE. |
Value
Invisibly returns the paths to the copied files.
Examples
## Not run:
chapter_materials(1)
chapter_materials(4)
chapter_materials(4, path = "course-materials")
## End(Not run)
Copy or run a textbook chapter script
Description
'chapter_script()' is deprecated. Use [chapter_materials()] instead to copy the complete set of materials associated with a textbook chapter.
This function is retained for backward compatibility with existing code.
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
## Not run:
tmp <- tempdir()
chapter_script(3, "helper", dest = tmp, overwrite = TRUE)
## End(Not run)
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 Chapters
Description
Lists textbook chapters and the learning materials available for each chapter, including the Quarto chapter file, helper script, and completed script.
Usage
list_chapters()
Value
A data frame describing the available chapter materials.
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*.