diff --git a/R/model_get_n.R b/R/model_get_n.R index 6cc19f32..7ad1c81b 100644 --- a/R/model_get_n.R +++ b/R/model_get_n.R @@ -31,6 +31,7 @@ #' ) #' mod %>% model_get_n() #' +#' \dontrun{ #' mod <- glm( #' Survived ~ Class * Age + Sex, data = Titanic %>% as.data.frame(), #' weights = Freq, family = binomial @@ -56,6 +57,7 @@ #' ) #' mod %>% model_get_n() #' +#' dont #' df <- survival::lung %>% dplyr::mutate(sex = factor(sex)) #' mod <- survival::coxph(survival::Surv(time, status) ~ ph.ecog + age + sex, data = df) #' mod %>% model_get_n() @@ -72,6 +74,7 @@ #' family = binomial, data = lme4::cbpp #' ) #' mod %>% model_get_n() +#' } model_get_n <- function(model) { UseMethod("model_get_n") } diff --git a/man/model_get_n.Rd b/man/model_get_n.Rd index 7bee0311..4335e007 100644 --- a/man/model_get_n.Rd +++ b/man/model_get_n.Rd @@ -60,6 +60,7 @@ mod <- glm( ) mod \%>\% model_get_n() +\dontrun{ mod <- glm( Survived ~ Class * Age + Sex, data = Titanic \%>\% as.data.frame(), weights = Freq, family = binomial @@ -85,6 +86,7 @@ mod <- glm( ) mod \%>\% model_get_n() +dont df <- survival::lung \%>\% dplyr::mutate(sex = factor(sex)) mod <- survival::coxph(survival::Surv(time, status) ~ ph.ecog + age + sex, data = df) mod \%>\% model_get_n() @@ -102,6 +104,7 @@ mod <- lme4::glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), ) mod \%>\% model_get_n() } +} \seealso{ Other model_helpers: \code{\link{model_compute_terms_contributions}()},