Skip to content

Commit

Permalink
merge pr #1057: v0.7.10
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpcouch committed Oct 31, 2021
2 parents ceb5586 + 5cad50f commit f2f663a
Show file tree
Hide file tree
Showing 212 changed files with 1,059 additions and 19 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Type: Package
Package: broom
Title: Convert Statistical Objects into Tidy Tibbles
Version: 0.7.9.9001
Version: 0.7.10
Authors@R:
c(person(given = "David",
family = "Robinson",
Expand Down Expand Up @@ -539,7 +539,8 @@ Imports:
rlang,
stringr,
tibble (>= 3.0.0),
tidyr (>= 1.0.0)
tidyr (>= 1.0.0),
ggplot2
Suggests:
AER,
akima,
Expand All @@ -565,7 +566,6 @@ Suggests:
gam (>= 1.15),
gee,
geepack,
ggplot2,
glmnet,
glmnetUtils,
gmm,
Expand Down
6 changes: 4 additions & 2 deletions NEWS.md
@@ -1,12 +1,14 @@
# broom 0.7.9.9001
# broom 0.7.10

To be released as broom 0.7.10.

* Clarifies error when `pysch::mediate` output is dispatched to `tidy.mediate` (`#1037` by `@LukasWallrich`).
* Allows user to specify confidence level for `tidy.rma` (`#1041` by `@TarenSanders`)
* Clarifies documentation related to usage of `augment_columns()`; most package users should use `augment()` in favor of `augment_columns()`. See `?augment_columns` for more details.
* Extends support for `emmeans` by fixing non-standard column names in case of asymptotically derived inferential statistics. (`#1046` by `@crsh`)
* Fixes use of index columns in `augment.mlogit`. (`#1045` and `#1053` by `@jamesrrae` and `@gregmacfarlane`)
* Fixes use of index columns in `augment.mlogit` and adds `.resid` column to
output. (`#1045`, `#1053`, `#1055`, and `#1056` by `@jamesrrae` and
`@gregmacfarlane`)
* Correct column naming of standard error measures in `glance.survfit()`.
* Various bug fixes and improvements to documentation.

Expand Down
7 changes: 6 additions & 1 deletion R/aer-tidiers.R
Expand Up @@ -23,7 +23,9 @@
#' )
#'
#' @examples
#'
#'
#' if (requireNamespace("AER", quietly = TRUE)) {
#'
#' library(AER)
#'
#' data("CigarettesSW", package = "AER")
Expand All @@ -45,6 +47,9 @@
#' augment(ivr, newdata = CigarettesSW)
#'
#' glance(ivr)
#'
#' }
#'
#' @export
#' @seealso [tidy()], [AER::ivreg()]
#' @family ivreg tidiers
Expand Down
5 changes: 5 additions & 0 deletions R/auc-tidiers.R
Expand Up @@ -7,6 +7,8 @@
#' @evalRd return_tidy("cutoff", "tpr", "fpr")
#'
#' @examples
#'
#' if (requireNamespace("AUC", quietly = TRUE)) {
#'
#' library(AUC)
#' data(churn)
Expand Down Expand Up @@ -36,6 +38,9 @@
#'
#' ggplot(rocs, aes(fpr, tpr, color = algorithm)) +
#' geom_line()
#'
#' }
#'
#' @export
#' @aliases auc_tidiers roc_tidiers
#' @seealso [tidy()], [AUC::roc()]
Expand Down
5 changes: 5 additions & 0 deletions R/bbmle-tidiers.R
Expand Up @@ -8,6 +8,8 @@
#' @evalRd return_tidy(regression = TRUE)
#'
#' @examples
#'
#' if (requireNamespace("bbmle", quietly = TRUE)) {
#'
#' library(bbmle)
#'
Expand All @@ -20,6 +22,9 @@
#' )
#'
#' tidy(fit)
#'
#' }
#'
#' @export
#' @seealso [tidy()], [bbmle::mle2()], [tidy_optim()]
#' @aliases mle2_tidiers bbmle_tidiers
Expand Down
5 changes: 5 additions & 0 deletions R/betareg-tidiers.R
Expand Up @@ -17,6 +17,8 @@
#' At least one term will have been used to model the precision `phi`.
#'
#' @examples
#'
#' if (requireNamespace("betareg", quietly = TRUE)) {
#'
#' library(betareg)
#' data("GasolineYield", package = "betareg")
Expand All @@ -31,6 +33,9 @@
#' augment(mod)
#'
#' glance(mod)
#'
#' }
#'
#' @export
#' @seealso [tidy()], [betareg::betareg()]
#' @family betareg tidiers
Expand Down
17 changes: 16 additions & 1 deletion R/bingroup-tidiers.R
Expand Up @@ -9,6 +9,8 @@
#' )
#'
#' @examples
#'
#' if (requireNamespace("binGroup", quietly = TRUE)) {
#'
#' library(binGroup)
#' library(dplyr)
Expand All @@ -17,6 +19,9 @@
#' bw <- binWidth(100, .1)
#' bw
#' tidy(bw)
#'
#' }
#'
#' @export
#' @family bingroup tidiers
#' @aliases binwidth_tidiers
Expand All @@ -39,6 +44,8 @@ tidy.binWidth <- function(x, ...) {
#' )
#'
#' @examples
#'
#' if (requireNamespace("binGroup", quietly = TRUE)) {
#'
#' library(binGroup)
#' des <- binDesign(
Expand All @@ -53,6 +60,9 @@ tidy.binWidth <- function(x, ...) {
#' library(ggplot2)
#' ggplot(tidy(des), aes(n, power)) +
#' geom_line()
#'
#' }
#'
#' @export
#' @family bingroup tidiers
#' @aliases bindesign_tidiers
Expand All @@ -77,7 +87,9 @@ tidy.binDesign <- function(x, ...) {
#' )
#'
#' @examples
#'
#'
#' if (requireNamespace("binGroup", quietly = TRUE)) {
#'
#' library(binGroup)
#' des <- binDesign(
#' nmax = 300, delta = 0.06,
Expand All @@ -90,6 +102,9 @@ tidy.binDesign <- function(x, ...) {
#' library(ggplot2)
#' ggplot(tidy(des), aes(n, power)) +
#' geom_line()
#'
#' }
#'
#' @export
#' @family bingroup tidiers
#' @seealso [glance()], [binGroup::binDesign()]
Expand Down
5 changes: 5 additions & 0 deletions R/boot-tidiers.R
Expand Up @@ -22,6 +22,8 @@
#' `std.error` columns shown.
#'
#' @examples
#'
#' if (requireNamespace("boot", quietly = TRUE)) {
#'
#' library(boot)
#'
Expand All @@ -40,6 +42,9 @@
#' bootres <- boot(clotting, bootfun, R = 999)
#' tidy(g1, conf.int = TRUE)
#' tidy(bootres, conf.int = TRUE)
#'
#' }
#'
#' @export
#' @aliases boot_tidiers
#' @seealso [tidy()], [boot::boot()], [boot::tsboot()], [boot::boot.ci()],
Expand Down
9 changes: 9 additions & 0 deletions R/car-tidiers.R
Expand Up @@ -11,10 +11,15 @@
#' )
#'
#' @examples
#'
#' if (requireNamespace("car", quietly = TRUE)) {
#'
#' dw <- car::durbinWatsonTest(lm(mpg ~ wt, data = mtcars))
#' tidy(dw)
#' glance(dw) # same output for all durbinWatsonTests
#'
#' }
#'
#' @name durbinWatsonTest_tidiers
#' @family car tidiers
#' @export
Expand Down Expand Up @@ -50,11 +55,15 @@ glance.durbinWatsonTest <- function(x, ...) tidy(x)
#'
#' @examples
#'
#' if (requireNamespace("car", quietly = TRUE)) {
#'
#' library(car)
#' data(Moore)
#' lt <- with(Moore, leveneTest(conformity, fcategory))
#' tidy(lt)
#' glance(lt) # same output for all leveneTest
#'
#' }
#' @name leveneTest_tidiers
#' @family car tidiers
#' @export
Expand Down
5 changes: 5 additions & 0 deletions R/caret-tidiers.R
Expand Up @@ -18,6 +18,8 @@
#' )
#'
#' @examples
#'
#' if (requireNamespace("caret", quietly = TRUE)) {
#'
#' library(caret)
#'
Expand Down Expand Up @@ -46,6 +48,9 @@
#'
#' tidy(six_class_cm)
#' tidy(six_class_cm, by_class = FALSE)
#'
#' }
#'
#' @aliases caret_tidiers confusionMatrix_tidiers
#' @export
#' @seealso [tidy()], [caret::confusionMatrix()]
Expand Down
4 changes: 4 additions & 0 deletions R/cmprsk-tidiers.R
Expand Up @@ -16,6 +16,8 @@
#' )
#'
#' @examples
#'
#' if (requireNamespace("cmprsk", quietly = TRUE)) {
#'
#' library(cmprsk)
#' lrf_time <- rexp(100) #time to loco-regional failure (lrf)
Expand All @@ -25,6 +27,8 @@
#' x <- crr(lrf_time, lrf_event, cbind(trt, strt))
#' tidy(x, conf.int = TRUE)
#' glance(x)
#'
#' }
#'
#' @aliases cmprsk_tidiers
#' @export
Expand Down
5 changes: 5 additions & 0 deletions R/drc-tidiers.R
Expand Up @@ -14,6 +14,8 @@
#' The `curveid` column indicates the curve.
#'
#' @examples
#'
#' if (requireNamespace("drc", quietly = TRUE)) {
#'
#' library(drc)
#'
Expand All @@ -27,6 +29,9 @@
#' glance(mod)
#'
#' augment(mod, selenium)
#'
#' }
#'
#' @export
#' @seealso [tidy()], [drc::drm()]
#' @family drc tidiers
Expand Down
5 changes: 5 additions & 0 deletions R/emmeans-tidiers.R
Expand Up @@ -27,6 +27,8 @@
#' passed on to [emmeans::summary.emmGrid()] or [lsmeans::summary.ref.grid()].
#'
#' @examples
#'
#' if (requireNamespace("emmeans", quietly = TRUE)) {
#'
#' library(emmeans)
#' # linear model for sales of oranges per day
Expand Down Expand Up @@ -68,6 +70,9 @@
#'
#' # joint_tests
#' tidy(joint_tests(oranges_lm1))
#'
#' }
#'
#' @aliases emmeans_tidiers
#' @export
#' @family emmeans tidiers
Expand Down
4 changes: 4 additions & 0 deletions R/epiR-tidiers.R
Expand Up @@ -21,6 +21,8 @@
#'
#' @examples
#'
#' if (requireNamespace("epiR", quietly = TRUE)) {
#'
#' library(epiR)
#'
#' dat <- matrix(c(13, 2163, 5, 3349), nrow = 2, byrow = TRUE)
Expand All @@ -36,6 +38,8 @@
#' tidy(fit, parameters = "moa")
#' tidy(fit, parameters = "stat")
#'
#' }
#'
#' @export
#' @seealso [tidy()], [epiR::epi.2by2()]
#' @family epiR tidiers
Expand Down
4 changes: 4 additions & 0 deletions R/ergm-tidiers.R
Expand Up @@ -21,6 +21,8 @@
#' \item{p.value}{The two-sided p-value}
#'
#' @examples
#'
#' if (requireNamespace("ergm", quietly = TRUE)) {
#'
#' library(ergm)
#' # Using the same example as the ergm package
Expand All @@ -43,6 +45,8 @@
#' glance(gest, deviance = TRUE)
#' glance(gest, mcmc = TRUE)
#'
#' }
#'
#' @references Hunter DR, Handcock MS, Butts CT, Goodreau SM, Morris M (2008b).
#' \pkg{ergm}: A Package to Fit, Simulate and Diagnose Exponential-Family
#' Models for Networks. *Journal of Statistical Software*, 24(3).
Expand Down
5 changes: 5 additions & 0 deletions R/fixest-tidiers.R
Expand Up @@ -26,6 +26,9 @@
#' \url{https://github.com/sgaure/lfe/issues/1#issuecomment-530646990})
#'
#' @examples
#'
#' if (requireNamespace("fixest", quietly = TRUE)) {
#'
#' \donttest{
#' library(fixest)
#'
Expand All @@ -50,6 +53,8 @@
#' # Approach (1) is preferred.
#'
#' }
#'
#' }
#'
#' @export
#' @family fixest tidiers
Expand Down
5 changes: 5 additions & 0 deletions R/gam-tidiers.R
Expand Up @@ -17,12 +17,17 @@
#' [tidy.gam()].
#'
#' @examples
#'
#' if (requireNamespace("gam", quietly = TRUE)) {
#'
#' library(gam)
#' g <- gam(mpg ~ s(hp, 4) + am + qsec, data = mtcars)
#'
#' tidy(g)
#' glance(g)
#'
#' }
#'
#' @export
#' @family gam tidiers
#' @aliases Gam_tidiers
Expand Down
5 changes: 5 additions & 0 deletions R/geepack-tidiers.R
Expand Up @@ -14,6 +14,8 @@
#' missingness in the data beforehand.
#'
#' @examples
#'
#' if (requireNamespace("geepack", quietly = TRUE)) {
#'
#' library(geepack)
#' data(state)
Expand All @@ -28,6 +30,9 @@
#'
#' tidy(geefit)
#' tidy(geefit, conf.int = TRUE)
#'
#' }
#'
#' @evalRd return_tidy(regression = TRUE)
#'
#' @export
Expand Down

0 comments on commit f2f663a

Please sign in to comment.