Changelog
Source:NEWS.md
moderndive 0.8.0
-
View()now renders correctly inside webR (the in-browser R that powers the ModernDive book’s live exercises). webR has no pandoc, so aDT::datatable()htmlwidget cannot be saved as the self-contained HTML the cell needs (DT::saveWidget()errors), and the auto-print path is gated byinteractive()beingFALSE. In webR,View()now builds a self-contained static HTML table and pushes it through webR’s viewer hook, so the data displays inline instead of only printing the explanatory message. Outside webR theDT::datatable()behaviour is unchanged. - Fix issue #58
- Add in unit tests to bring test coverage back to 100%
-
get_regression_points()andget_regression_summaries()now handle in-formula transformations on either side of the model formula (e.g.lm(log(y) ~ poly(x, 2))). LHS transforms previously errored; they now produce a sanitized outcome column on the model’s scale (e.g.log_mpg,log_mpg_hat). RHS transforms no longer leak basis matrices or wrapper columns (poly()matrix columns,scale(),I()) into the points table; the original predictor variable is shown instead. The.rownamescolumn is no longer leaked into the output. -
get_regression_table(),get_regression_points(), andget_regression_summaries()now acceptglm()model objects (resolves issue #20). Forglm()models,get_regression_points()returns fitted values and residuals on the response scale (e.g. probabilities for logistic regression).get_regression_summaries()returns a glm-shaped summary (mse,rmse,deviance,null_deviance,aic,bic,log_lik,df_residual,df_null,nobs) — R² columns are not included since they don’t apply to glm.get_regression_table()gains anexponentiateargument (defaultFALSE) for returning odds/rate ratios for log/logit-link models. - Internal: factor-level pretty-printing in
get_regression_table()is now applied to the tidy output’stermcolumn rather thanmodel$coefficientsnames, which avoids breakingconfint.glm’s profile-likelihood refits. - Drop redundant
@docType packagetag fromR/moderndive.R(resolves issue #133). The"_PACKAGE"sentinel was already in place, so themoderndive-packagealias is generated correctly. - Fix
pennies_resamplesso thereplicatecolumn is correctly numbered 1..35 instead of being uniformly1(resolves issue #130). The bug was anungroup()missing in thedata-raw/process_data_sets.Rpipeline, somutate(replicate = 1:n())ran per-group on a single-row nested tibble. The dataset has been regenerated; row count and structure are otherwise unchanged. - New
View()wrapper (resolves issue #99). In an interactive R session it behaves identically toutils::View(). In non-interactive contexts (R Markdown, Quarto, scripts) whereutils::View()typically errors, it instead renders an interactiveDT::datatable()inline so documents can still knit/render.DTis now inImports. A shortpackageStartupMessage()is emitted only on non-interactive attach to explain the override; interactive sessions see no extra message. Attachingmoderndivemasksutils::View. For large data frames the inlineDT::datatable()is slow and warns that the data is too big for a client-side table, so in non-interactive contextsView()now shows a random sample ofnrows (default1000) whenxis larger, emitting a message that says so. New argumentsn(sample size),full = FALSE(setTRUEto show every row),seed(reproducible sample), andquiet = FALSE(silence the message) control this; the sample never disturbs the caller’s RNG stream, and the interactiveutils::View()path is unchanged. - Documentation examples now use
moderndivedatasets instead of base R /ggplot2ones.View(),get_correlation(),get_regression_table(),get_regression_points(),get_regression_summaries(),plot_3d_regression(), and the package-level overview now useun_member_states_2024(withlife_expectancy_2022 ~ gdp_per_capita-style models).geom_categorical_model()now usesevals(score ~ rank) instead ofggplot2::mpg(hwy ~ drv). -
_pkgdown.yml: siteurl:now includes thehttps://scheme sopkgdown::check_pkgdown()matches it against the URL listed inDESCRIPTION. -
README: added descriptivealttext to the hex-sticker image. -
get_correlation()now accepts multiple right-hand-side variables in the formula (e.g.mpg ~ hp + cyl + wt) (resolves issue #29). The default output is a long tibble with one row per predictor; passwide = TRUEfor one column per predictor. Single-RHS behavior is unchanged. A one-time message points users tocorrr::correlate()if they want a full pairwise correlation matrix; suppress it withquiet = TRUE. - New
plot_3d_regression()function for interactive 3D scatterplots with a fitted regression plane (resolves issue #27). Pass a formulaz ~ x + yand the function returns a [plotly][plotly::plotly] htmlwidget.plotlyis inSuggests; install it withinstall.packages("plotly")to use this function.
moderndive 0.7.0
CRAN release: 2024-09-01
- Added
un_member_states_2024data for upcoming ModernDive v2 updates - Added
spotify_by_genredata for upcoming ModernDive v2 updates - Added
tidy_summary()function to summarize data frame columns for upcoming ModernDive v2 updates - Added
old_faithful_2024data for upcoming ModernDive v2 updates - Added
coffee_qualitydata for upcoming ModernDive v2 updates - Added
almonds_sampledata for upcoming ModernDive v2 updates
moderndive 0.6.1
CRAN release: 2024-06-30
- Added
almonds_bowlandalmonds_sample_100data for upcoming ModernDive v2 updates to Inference chapters - Added
early_january_2023_weatherandenvoy_flightsdata for upcoming ModernDive v2 updates derived from data in thenycflights23package
moderndive 0.5.5
CRAN release: 2022-12-01
- Addressing
broomreverse dependency issue https://github.com/moderndive/moderndive/issues/128
moderndive 0.5.4
CRAN release: 2022-05-13
- Added
early_january_weatherconsisting of January subset ofnycflights13::weather - Added 10 datasets curated by @wjhopper @lacombe129 and @sastoudt for ideal use in intro statistics courses (@beanumber and @mariumtapal did preliminary pull request management and code reviews)
- @statsmed-sheep @caroline-mckenna @zyang2k @CJParkNW added
coffee_qualitydataset: 1340 samples of coffee tested for their quality level - @abbidabbers @georgiagans @kaceyjj added
amazon_booksdataset: sample of books available for purchase on Amazon.com - @ewhalen1 @vivala1 @Swaha294 @CCccc-76 added
ipf_liftsconsisting of international power lifting results - @i-m-foster @mflesaker @ajhaller added
babieson maternal smoking and infant health - @tianshu-zhang @q-w-a @kbruncati @katelyndiaz added
ev_charging: information from 3,395 high resolution electric vehicle charging sessions. - @rwu08 @arrismo @rporta23 @katephan added
ma_traffic_2020_vs_2019consisting of collisions information sourced from reports produced by the Massachusetts Traffic Data Management System. - @amutaya @catherinepeppers @agoswa @wndlovu added
mass_traffic_2020consisting of traffic data for 13 Massachusetts counties - @shirleyzhang-1999 @hartlegr @silasweden added
mario_kart_auctiondataset - @heschmidt @evejcik @tessgold @nikkischuldt added
avocadosconsisting of avocado prices dataset downloaded from the Hass Avocado Board website in May of 2018. - @hongtonglin @alejanmg @egordonhalpern added
saratoga_housesrandom sample of 1057 houses taken from full Saratoga Housing Data.
- @statsmed-sheep @caroline-mckenna @zyang2k @CJParkNW added
moderndive 0.5.3
CRAN release: 2022-01-20
- Added
alaska_flightsconsisting of Alaska Airlines subset ofnycflights13::flights
moderndive 0.5.2
CRAN release: 2021-07-21
- Changed printing of non-baseline categorical variable levels in regression table to be cleaner #102
- Added explicit
conf.levelargument toget_regression_table()inherited frombroom::tidy.lm() - Improved main package vignette based on feedback from @lwjohnst86 & @lisamr
- Added JOSE publication in
vignettes/paper.md - Fixed
pkgdownandcovrissues, defragged documentation.
moderndive 0.5.0
CRAN release: 2020-07-19
- Modified
vignettes/why-moderndive.Rmdmain vignette - Updated
geom_parallel_slopes()with new arguments:- Use
fullrange=TRUEto draw regression lines over the entire support of the x-axis (by @wjhopper) - Use
levelto set different level of confidence interval shading (by @echasnovski)
- Use
- Added new function
geom_categorical_model()for visualizing regression models with one categorical explanatory/predictor variable (by @wjhopper) - Add deprecation warning message to
gg_parallel_slopes()directing users to usegeom_parallel_slopes()instead (by @mariumtapal)
moderndive 0.4.0
CRAN release: 2019-11-04
- Added
geom_parallel_slopes()geom extension toggplot2package to plot parallel slopes regression models with one numerical and one categorical variable (this is not possible usingggplot2::geom_smooth()). Note this rendersgg_parallel_slopes()function added in v0.3.0 obsolete. - Added example of
geom_parallel_slopes()to “Whymoderndive?” vignette - Added student names (permission obtained in all cases) to
pennies_resamplesdata frame columns -
get_correlation()now:- Respects
dplyr::group_by()grouping - Can handle missing data by either passing
na.rm = TRUEargument or by passing standardstats:cor(use = "complete.obs")argument via...
- Respects
moderndive 0.3.0
CRAN release: 2019-07-18
- Added minimally viable “parallel slopes” regression model plotting function
gg_parallel_slopes(). In the future we hope to define a newggplot2geom. - Added “Why
moderndive?” vignette - Added ID argument to
get_regression_points()to return a column that identifies the observational units/rows - Datasets:
- Added
DD_vs_SB: Dunkin Donuts and Starbucks in Eastern Massachusetts data collected by @DelaneyMoran - Added
promotions: tibble version ofopenintro::gender.discriminationused to illustrate permutation test. - Added
MA_schools: Relationship between SAT scores and socio-economic status for Massachusetts high schools. - Added
mythbusters_yawn: Data from study on Mythbusters show on whether yawning is - Added
promotions_shuffled: one instance ofpromotionswithgenderpermuted/shuffled - Original
pennies_samplesample of 40 pennies frompennieshas been renamedorig_pennies_sample. Newpennies_sampleconsists of 50 pennies sampled from bank in Northampton, MA, USA on 2019/2/1. - Added
pennies_resamples: 35 bootstrap resamples of newpennies_sample - Added
movies_genre: random sample of 32 action and 36 romance movies fromggplot2movies::movies
- Added
- Removed all
assertive::assert()code - Converted
house_prices$datefromdttm(date-time) todateper R4DS comment on using simplest data type possible
moderndive 0.2.0
CRAN release: 2018-07-06
Updated package for:
- Use in DataCamp’s Modeling with Data in the Tidyverse, in particular added
evalsandhouse_pricesdatasets and updatedget_regression_table()andget_regression_points()functions. - v0.4.0 of ModernDive textbook
Details:
- Created
get_correlation()function to omit$syntax and return a data frame - Import
infer::rep_sample_n()instead of our own defined version, as this function is now included ininfer - Added
evals,house_prices,tactile_prop_red,pennies_sampleandmythbusters_yawndatasets - Added mean squared error and root mean squared error to output of
get_regression_summaries() - Added
newdataargument toget_regression_points(). When:- Original outcome variable is included in
newdata, output it as well asresidual(See Issue 17). - Otherwise omit
residual
- Original outcome variable is included in
- Removed
tidyversefrom Depends, Imports, or Suggests
moderndive 0.1.0
CRAN release: 2018-01-22
- Added three
get_regression_*functions meant for novice R users/regression fitters that process regression model outputs - Added datasets:
-
pennies: 800 pennies to be treated as a population from which to simulate sampling a numerical variable from (yearof minting) -
bowl: Bowl of 2400 balls of which 900 are red to be treated as a population from which to simulate sampling a categorical variable from (color). Also known as the urn sampling framework . -
bowl_samples: data from tactile version of sampling frombowldone in class: 10 groups sampled n=50 balls from and counted the number red [ADD MODERNDIVE LINK]
-