• Stars
    star
    231
  • Rank 173,434 (Top 4 %)
  • Language
    R
  • License
    GNU General Publi...
  • Created over 10 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ“ฆ R package for data and supplemental functions for OpenIntro resources

openintro Hex logo for package

CRAN status R-CMD-check Lifecycle: stable CRAN RStudio mirror downloads

Supplemental functions and data for OpenIntro resources, which includes open-source textbooks and resources for introductory statistics at openintro.org. The package contains data sets used in our open-source textbooks along with custom plotting functions for reproducing book figures. The package also contains the datasets used in OpenIntro labs. Note that many functions and examples include color transparency; some plotting elements may not show up properly (or at all) when run in some versions of Windows operating system.

Installation

You can install the released version of openintro from CRAN with:

install.packages("openintro")

You can install the development version of openintro from GitHub with:

# install.packages("devtools")
library(devtools)
install_github("OpenIntroStat/openintro")

This package was produced as part of the OpenIntro project. For the accompanying textbook, visit openintro.org. A PDF of the textbook is free and paperbacks can be purchased online (royalty-free).

Questions, bugs, feature requests

You can file an issue to get help, report a bug, or make a feature request.

When filing an issue to get help or report a bug, please make a minimal reproducible example using the reprex package. If you havenโ€™t heard of or used reprex before, youโ€™re in for a treat! Seriously, reprex will make all of your R-question-asking endeavors easier (which is a pretty insane ROI for the five to ten minutes itโ€™ll take you to learn what itโ€™s all about). For additional reprex pointers, check out the Get help! section of the tidyverse site.

Before opening a new issue, be sure to search issues and pull requests to make sure the bug hasnโ€™t been reported and/or already fixed in the development version. By default, the search will be pre-populated with is:issue is:open. You can edit the qualifiers (e.g.ย is:pr, is:closed) as needed. For example, youโ€™d simply remove is:open to search all issues in the repo, open or closed.

Contributing

Process for adding new data to the package

The following steps use the devtools and usethis packages for various steps. We recommend using this process when suggesting new datasets to be added to the package. If the dataset is large (>500MB) or youโ€™d like to add a function, please open an issue first for discussion before making the pull request.

  1. Fork and clone the repo with usethis::create_from_github("OpenIntroStat/openintro")
    • Note: If you have write access to the repo, you can skip this step.
  2. Start a new pull request with usethis::pr_init("BRANCH-NAME"), where BRANCH-NAME is an informative branch name.
  3. If adding a file that is not an .rda file to begin with (Excel, csv, etc.), create a folder in the data-raw folder with the name of the dataset (how youโ€™d like it to show up in the package). Please use snake_case for naming, e.g.ย name_of_dataset.
  4. Place your dataset in its raw form in the folder.
  5. Also in the data-raw folder, create a new R script called name_of_dataset-dataprep.R and write the code needed to read in the file, make any modifications to the data that are needed (if any), and end with usethis::use_data() to save the data in the package as an .rda file with the ideal compression. See examples from other folders in data-raw for sample code. The contents of this folder do not end up in the package (the entire folder is ignored in the .Rbuildignore) so you donโ€™t need to worry about adding package dependencies etc.
  6. In the R folder, create an R script called data-name_of_dataset and add documentation using Roxygen style. See other documentation files for help with style. In the examples, use tidyverse syntax but do not use library(tidyverse) and only use the relevant packages, e.g.ย library(dplyr), library(ggplot2).
  7. Restart R and run devtools::load_all() to make sure the data loads and run your examples to confirm they all work.
  8. Run devtools::document(), restart R, and then devtools::load_all(). Then, check out ?name_of_dataset to make sure the documentation looks as expected.
  9. Run devtools::check(). The only NOTE you should see as a result of the check should be about the package size. If any other ERRORs, NOTEs, or WARNINGs are generated, resolve them or open an issue for help.
  10. In the pkgdown.yml file, add the name of the dataset under reference, in the correct alphabetical order.
  11. Add a note in the NEWS.md with the new dataset youโ€™ve added with a link to your GitHub username so we can acknowledge your contribution, e.g.ย โ€œadded by @mine-cetinkaya-rundelโ€.

Code of Conduct

Please note that the openintro project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

More Repositories

1

ims

๐Ÿ“š Introduction to Modern Statistics - A college-level open-source textbook with a modern approach highlighting multivariable relationships and simulation-based inference. For v1, see https://openintro-ims.netlify.app.
JavaScript
870
star
2

openintro-statistics

๐Ÿ“š An open-source textbook written at the college level. OpenIntro also offers a second college-level intro stat textbook and also a high school variant.
TeX
411
star
3

openintro-statistics-slides

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿซ Slides for OpenIntro Statistics
TeX
94
star
4

oilabs-tidy

๐Ÿ‘ฉ๐Ÿฟโ€๐Ÿ’ป OpenIntro Labs in R using the tidyverse design philosophy, grammar, and data structures
HTML
66
star
5

openintro-statistics-learn-obj

๐ŸŽฏ Learning objectives for OpenIntro Statistics
TeX
46
star
6

ims-tutorials

Interactive tutorials developed with the learnr package supporting the textbook OpenIntro::Introduction to Modern Statistics.
HTML
33
star
7

oilabs

๐Ÿ›‘ This package has been deprecated and datasets and functionality have been moved to the openintro package
R
10
star
8

oilabs-jamovi

๐Ÿ’ป OpenIntro labs for Jamovi
HTML
6
star
9

usdata

๐Ÿ“ฆ Data on the states and counties of the United States ๐Ÿ‡บ๐Ÿ‡ธ
R
5
star
10

cherryblossom

๐Ÿ“ฆ R package for data from the Cherry Blossom Ten Mile Run ๐ŸŒธ
R
5
star
11

oilabs-stata

๐Ÿ‘ฉ๐Ÿฟโ€๐Ÿ’ป OpenIntro Labs in Stata
HTML
3
star
12

openintro-labs-rguroo

๐Ÿ‘ฉ๐Ÿฟโ€๐Ÿ’ป Labs for OpenIntro Statistics using Rguroo
HTML
1
star
13

airports

๐Ÿ“ฆ R package for data on airports ๐Ÿ›ซ
R
1
star
14

oilabs-jasp

๐Ÿ’ป OpenIntro labs for Jasp
HTML
1
star