tidymodels / broom
Showing 1 of 5 files from the diff.
Other files ignored by Codecov
NEWS.md has changed.
man/tidy.gam.Rd has changed.
DESCRIPTION has changed.

@@ -6,6 +6,7 @@
Loading
6 6
#'   be tidied. Defaults to `FALSE`, meaning that smooth terms are tidied
7 7
#'   by default.
8 8
#' @template param_confint
9 +
#' @template param_exponentiate
9 10
#' @template param_unused_dots
10 11
#'
11 12
#' @evalRd return_tidy(
@@ -37,10 +38,13 @@
Loading
37 38
#' @family mgcv tidiers
38 39
#' @seealso [tidy()], [mgcv::gam()]
39 40
tidy.gam <- function(x, parametric = FALSE, conf.int = FALSE,
40 -
                     conf.level = 0.95, ...) {
41 +
                     conf.level = 0.95, exponentiate = FALSE, ...) {
41 42
  if (!parametric && conf.int) {
42 43
    message("Confidence intervals only available for parametric terms.")
43 44
  }
45 +
  if (!parametric && exponentiate) {
46 +
    message("Exponentiating coefficients only available for parametric terms.")
47 +
  }
44 48
  if (parametric) {
45 49
    px <- summary(x)$p.table
46 50
    ret <- as_tidy_tibble(
@@ -64,6 +68,11 @@
Loading
64 68
    class(sx) <- c("anova", "data.frame")
65 69
    ret <- tidy(sx)
66 70
  }
71 +
  
72 +
  if (exponentiate && parametric) {
73 +
    ret <- exponentiate(ret)  
74 +
  }
75 +
  
67 76
  ret
68 77
}
69 78
Files Coverage
R 83.57%
Project Totals (108 files) 83.57%
Notifications are pending CI completion. Waiting for GitHub's status webhook to queue notifications. Push notifications now.
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
        informational: true
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
14
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading