coursekata (development version)
-
library(coursekata)no longer attachesfivethirtyeightdata, and the drat repository that existed only to serve it is gone. No CourseKata teaching content uses any of its 19 exclusive datasets, and it accounted for roughly 63 MiB of the browser-based Playground bundle – 93% of the cost of shipping every suggested data package.fivethirtyeightitself is unaffected; if you use a dataset that lived only infivethirtyeightdata, install it withinstall.packages("fivethirtyeightdata", repos = "https://fivethirtyeightdata.github.io/drat/"). - Relicensed from AGPL-3 to GPL-3-or-later. The Affero clause obliges anyone who runs modified code as a network service to publish their changes, which is aimed at hosted applications rather than at a package people install and teach with. GPL keeps the copyleft that matters here – modifications stay open – without attaching a condition that has no bearing on how
coursekatais actually used. - Require
mosaic1.10.2 or later, which raises the minimum R version to 4.1. Earliermosaicreleases are broken byrlang1.2.0:do(1000) * b1(shuffle(...))returns the same value a thousand times instead of a sampling distribution, with no error to warn you. Sincecoursekataattachesmosaicfor you, an old copy meant silently wrong sampling distributions in your own work. - Reference examples no longer build their data with
do()andshuffle(). They construct the same distributions with base R, so a reference page cannot break because an attached package changed the shape of what it returns. The full shuffle-and-estimate workflow is now taught in the sampling distributions guide, alongside a new model visualization guide. - New documentation site at https://coursekata.github.io/coursekata-r/, with a curated function reference and the JupyterLite demo moved to https://coursekata.github.io/coursekata-r/lite/, which now opens on the getting-started notebook.
- Fix
gf_resid(),gf_square_resid(),gf_resid_fun(), andgf_square_resid_fun()overlays misaligning with jittered points: jitter positions are now pinned to the plot itself, so they are stable across repeated builds and chained calls, and the user’s random seed is no longer reset. - Fix
gf_square_resid()drawing rectangles instead of squares on jittered plots. The vertical side was measured from the displayed (jittered) position, but the horizontal side was measured against the model’s unjittered response, so the two sides disagreed by the size of the jitter. The whole point of the plot is to show squared error as area, so a shape that was not actually square undermined it. - Fix jitter pinning leaking out of the plot being drawn. A layer written as
geom_jitter()orposition = "jitter"shares one position object with every other such layer in the session, so pinning it in place fixed the jitter for unrelated plots too. -
gf_sd_ruler()now works on histograms, drawing a horizontal ruler from the mean to mean + SD along the baseline. -
gf_sd_ruler()now reports which variable it could not use, instead of failing insidesd()on a categorical outcome or silently drawing nothing when handed a name that is not in the data. - Fix variable names in
gf_sd_ruler()’syandxarguments. Bare (unquoted) names previously errored despite being documented, and a variable holding a column name stopped resolving when that was fixed; all three spellings now work. - Rebuild the hex sticker from the official brand artwork so it renders identically everywhere. The previous one set its letters as live text in a licensed font it could not embed, which fell back to a different typeface on most machines and to missing-glyph boxes in the favicons.
-
gf_squaresid()is no longer deprecated: it remains a fully supported alias ofgf_square_resid(). With our appreciation to Tyler Haslam (@TH4SL4M), the Utah high school teacher whose efforts shaped the residual and squared-residual visualizations – including working out howgf_resid()andgf_square_resid()handle jitter plots, and the insight to emphasize the area of the squares rather than their outline – and who requested the function by this name. -
gf_resid()andgf_square_resid()now say when the model was fit on fewer observations than the plot draws, naming both counts.lm()drops rows with missing values, so a model fit on a variable with any gaps does not line up with the plot’s points; that mismatch used to surface as “arguments imply differing number of rows”, which says nothing about what went wrong or how to fix it. -
gf_model()now errors when an aesthetic is mapped to a variable that is not one of the model’s predictors, instead of silently dropping the mapping. A mapping the model could not honor used to just vanish from the plot without a word, which is a hard thing to debug in a notebook. - Expand reference examples for the model visualization and distribution functions with textbook-style, pedagogy-focused examples.
coursekata 0.19.2
CRAN release: 2026-03-10
- Add experimental visualization functions:
gf_resid_fun(),gf_square_resid_fun(),gf_sd_ruler(),gf_squareplot(),show_cutoffs(), andouter(). - Rename
gf_squaresid()togf_square_resid()with deprecation warning for the old name. - Add
coursekata.check_missingoption to control the missing-package install prompt, with automatic suppression on Emscripten/WASM environments. - Add tidyverse-style conflict reporting on startup, showing which coursekata exports mask objects from other packages.
- Relax ggplot2 version constraint to
>= 3.5.2to support Emscripten/WASM environments. - Improve performance of estimate extraction functions by bypassing
supernovawhen using default arguments.
coursekata 0.19.0
CRAN release: 2025-07-16
- Add
gf_resid()andgf_squaresid()functions for residual and squared residual plots that layer ontoggformula::gf_point()plots.
coursekata 0.18.1
CRAN release: 2024-12-12
- Add alternate name
Fingers$GendertoFingersdataset to prevent awkward naming in exercises.
coursekata 0.18.0
CRAN release: 2024-08-16
- Remove dependency on
pak.pakwas initially used to manage and parse dependencies, but itself depends oncurl.curlis not available on all platforms (e.g. WASM), so we have removed the dependency onpakand opted for pure R where possible (orremoteswhich has a pure R fallback). - Add
FoodQualitytoTipExperimentdataset. - Various CI improvements: update for compatibility with more
rhubplatforms, don’t runvdiffrtests on CI, allow tests to run in parallel. - Fix CRAN note by adding missing package anchors to link targets
coursekata 0.17.0
CRAN release: 2024-05-26
- Make CRAN compatible by removing
Remotesfield from DESCRIPTION - Update visual snapshot tests
- Improve handling of non-CRAN package installs
coursekata 0.16.0
- Make fivethirtyeight and Lock5withR required packages using the Remotes field (this is non-standard, but we aren’t on CRAN anyway)
- Update to ggplot 3.5.0, which required some small changes to the theme parameters
coursekata 0.14.1
CRAN release: 2023-10-27
- Reduce calls to
pak::pkg_status()to improve startup time - Address issue where
require(lib.loc = ...)was sometimes being passedNA - Appropriately skip actions that require the user when running in non-interactive mode (and add related tests)
coursekata 0.13.1
- Fix issue where startup message was not being displayed
- Make dependent startup package messages visible by default
- Add
coursekata.quietoption to suppress startup messages - Document
coursekata.quickstartandcoursekata.quietoptions in README - Trim unused packages in preparation for CRAN submission
coursekata 0.13.0
- Add
coursekata.quickstartoption, which can reduce load times significantly. - Reduce expensive lookups when attaching packages, further reducing load times.
- Re-introduce
gf_modeltests for density plots now that upstream is fixed. - Add
test_fit()simple model stats to help teachers evaluate student models.
coursekata 0.12.0
- Remove
sse(),ssm(),ssr(),SSE(),SSM(),SSR()functions: they conflict withMetricspackage. - Reverse package load order (load most important last so that they mask others)
coursekata 0.10.0
- Add
Metricspackage - Remove
zargle