coursekata

CRAN status R build status codecov lite-badge

Overview

CourseKata Statistics and Data Science is an interactive online textbook for teaching introductory statistics and data science in colleges, universities, and high schools. Part of CourseKata’s Better Book Project, we use research and student data to keep improving online learning resources.

Learn more about CourseKata and its services and materials at CourseKata.org.

The coursekata package makes it easy to install and load the packages, functions, and data used in CourseKata courses and supplementary materials. It additionally provides a handful of helper functions and augments some generic functions to provide cohesion between the network of packages. This package was inspired by the tidyverse meta-package.

Try it in your browser

You can try coursekata before installing anything: the live demo runs R and the coursekata package entirely in your browser (no installation required, powered by JupyterLite). It opens a getting-started notebook that walks through loading the package, exploring course data sets, and fitting and visualizing models.

Installation

install.packages("coursekata")

After installing the core packages, you might want to install the supplementary data packages used in the course. These are not required for the package to work, but they are used in the course materials. You can install them with the following command:

coursekata::coursekata_install()

If you don’t install these packages, you will be prompted to install them each time you load the package. If you want to disable that prompt, you can set options(coursekata.quickstart = TRUE).

Development version

To get a bug fix or to use a feature from the development version, you can install the development version of coursekata from GitHub.

# install.packages("pak")
pak::pak("coursekata/coursekata-r")

Loading Packages Used in CourseKata Courses

library(coursekata) will load the following core packages in addition to the functions and theme included in the coursekata package:

library(coursekata)

In addition to useful functions, many data sets are used by instructors who teach the course. This package installs these:

Startup options

Functions and Theme

This package also comes with a variety of functions useful for teaching statistics and data science: tools for layering models and residuals onto plots (e.g. gf_model(), gf_resid()), extracting estimates from fitted models for bootstrapping (e.g. b0(), b1(), pre()), sectioning distributions (e.g. middle(), tails()), and quantifying model fit. It also automatically sets a ggplot2 theme complete with colorblind-friendly palettes and other improvements to aid perception and clarity of plots.

Browse all of the functions and data sets, organized by what they are for, in the package reference.

Contributing

If you see an issue, problem, or improvement that you think we should know about, or you think would fit with this package, please let us know on our issues page. Alternatively, if you are up for a little coding of your own, submit a pull request:

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D