diff --git a/DESCRIPTION b/DESCRIPTION index 20529dfa2..6e5c3e989 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: broom Title: Convert Statistical Objects into Tidy Tibbles -Version: 0.7.12.9000 +Version: 0.8.0 Authors@R: c(person(given = "David", family = "Robinson", diff --git a/NEWS.md b/NEWS.md index 59ccbdd09..e4a7b8ce9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,15 +1,15 @@ -# broom 0.7.12.9000 +# broom 0.8.0 -To be released as broom 0.8.0. +This update makes significant improvements to documentation, fixes a number of bugs, and brings the development flow of the package up to date with other packages in the tidymodels. -While broom 0.8.0 does not introduce much in terms of new functionality or breaking changes, this update makes significant improvements to documentation and usability of the package and marks a new stage in the package's lifecycle. +In the big picture, this release: -* Many improvements to documentation: +* Makes many improvements to documentation: - All tidiers now have example code demonstrating usage in their documentation. Tidiers for base packages as well as selected others also include sample code for visualization of results with ggplot2. - Code examples in the documentation largely now follow consistent style---these changes were made largely to reflect the tidyverse style guide, addressing spacing, object naming, and commenting, among other things. - Examples previously marked with `\dontrun` or `\donttest` have been workshopped to run reliably. -* Clarify errors and warnings for deprecated and un-maintained tidiers. -* Ensure that tidiers are placed in files named according to the model-supplying package rather than the model object class for easier navigability of the source code. +* Clarifies errors and warnings for deprecated and un-maintained tidiers. +* Ensures that tidiers are placed in files named according to the model-supplying package rather than the model object class for easier navigability of the source code. ### Bug fixes and other improvements diff --git a/R/joinerml-tidiers.R b/R/joinerml-tidiers.R index 2621bcc9c..2a80d1be4 100644 --- a/R/joinerml-tidiers.R +++ b/R/joinerml-tidiers.R @@ -16,6 +16,10 @@ #' #' @examples #' +#' # broom only skips running these examples because the example models take a +#' # while to generate—they should run just fine, though! +#' \dontrun{ +#' #' # feel free to ignore the following line—it allows {broom} to supply #' # examples without requiring the model-supplying package to be installed. #' if (requireNamespace("joineRML", quietly = TRUE)) { @@ -66,6 +70,8 @@ #' # extract model statistics #' glance(fit) #' } +#' +#' } #' #' @export #' @aliases mjoint_tidiers joinerml_tidiers diff --git a/R/utilities.R b/R/utilities.R index 3c1262516..9db57a8ec 100644 --- a/R/utilities.R +++ b/R/utilities.R @@ -282,7 +282,7 @@ augment_columns <- function(x, data, newdata = NULL, type, type.predict = type, original <- data - if (class(na_action) == "exclude") { + if (inherits(na_action, "exclude")) { # check if values are missing if (length(stats::residuals(x)) > nrow(data)) { warning( @@ -300,7 +300,7 @@ augment_columns <- function(x, data, newdata = NULL, type, type.predict = type, # no NAs were left out; we can simply recombine original <- as_augment_tibble(original) return(as_tibble(cbind(original, ret))) - } else if (class(na_action) == "omit") { + } else if (inherits(na_action, "omit")) { # if the option is "omit", drop those rows from the data original <- as_augment_tibble(original) original <- original[-na_action, ] diff --git a/cran-comments.md b/cran-comments.md index 871a5aab1..30731e439 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,4 +1,4 @@ -# broom 0.7.12.9000 +# broom 0.8.0 ## R CMD check results @@ -6,6 +6,8 @@ # Reverse dependencies -We checked 196 reverse dependencies (179 from CRAN + 17 from BioConductor), +We checked 192 reverse dependencies (191 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. -We saw no new ERRORs, WARNINGs, or NOTEs. + + * We saw 0 new problems + * We failed to check 0 packages diff --git a/man/augment.mjoint.Rd b/man/augment.mjoint.Rd index 329d59d8f..767fc75d0 100644 --- a/man/augment.mjoint.Rd +++ b/man/augment.mjoint.Rd @@ -91,6 +91,10 @@ for the fixed and random effects of the longitudinal submodel. } \examples{ +# broom only skips running these examples because the example models take a +# while to generate—they should run just fine, though! +\dontrun{ + # feel free to ignore the following line—it allows {broom} to supply # examples without requiring the model-supplying package to be installed. if (requireNamespace("joineRML", quietly = TRUE)) { @@ -143,3 +147,5 @@ glance(fit) } } + +} diff --git a/man/glance.mjoint.Rd b/man/glance.mjoint.Rd index 0e810c692..60a84cea3 100644 --- a/man/glance.mjoint.Rd +++ b/man/glance.mjoint.Rd @@ -41,6 +41,10 @@ of the appropriate type. } \examples{ +# broom only skips running these examples because the example models take a +# while to generate—they should run just fine, though! +\dontrun{ + # feel free to ignore the following line—it allows {broom} to supply # examples without requiring the model-supplying package to be installed. if (requireNamespace("joineRML", quietly = TRUE)) { @@ -92,6 +96,8 @@ hvd2 <- augment(fit) glance(fit) } +} + } \seealso{ \code{\link[=glance]{glance()}}, \code{\link[joineRML:mjoint]{joineRML::mjoint()}} diff --git a/man/tidy.mjoint.Rd b/man/tidy.mjoint.Rd index 7e20ae9ed..5db807d6b 100644 --- a/man/tidy.mjoint.Rd +++ b/man/tidy.mjoint.Rd @@ -54,6 +54,10 @@ specify which components to return. } \examples{ +# broom only skips running these examples because the example models take a +# while to generate—they should run just fine, though! +\dontrun{ + # feel free to ignore the following line—it allows {broom} to supply # examples without requiring the model-supplying package to be installed. if (requireNamespace("joineRML", quietly = TRUE)) { @@ -105,6 +109,8 @@ hvd2 <- augment(fit) glance(fit) } +} + } \seealso{ \code{\link[=tidy]{tidy()}}, \code{\link[joineRML:mjoint]{joineRML::mjoint()}}, \code{\link[joineRML:bootSE]{joineRML::bootSE()}}