Skip to content

Commit

Permalink
verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 13, 2024
1 parent 61ca37f commit e09de72
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion R/estimate_grouplevel.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ estimate_grouplevel <- function(model, type = "random", ...) {
attr(random, "type") <- type
attr(random, "model") <- model
attr(random, "parameters") <- params
attr(random, "data") <- insight::get_data(model)[insight::find_random(model, split_nested = TRUE, flatten = TRUE)]
attr(random, "data") <- insight::get_data(model, verbose = FALSE)[insight::find_random(model, split_nested = TRUE, flatten = TRUE)]

Check warning on line 92 in R/estimate_grouplevel.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/estimate_grouplevel.R,line=92,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 133 characters.

Check warning on line 92 in R/estimate_grouplevel.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/estimate_grouplevel.R,line=92,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 133 characters.

class(random) <- c("estimate_grouplevel", class(random))
random
Expand Down
2 changes: 1 addition & 1 deletion R/estimate_slopes.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ estimate_slopes <- function(model,
trends <- trends[names(trends) != "1"]

# Restore factor levels
trends <- datawizard::data_restoretype(trends, insight::get_data(model))
trends <- datawizard::data_restoretype(trends, insight::get_data(model, verbose = FALSE))

# Table formatting
attr(trends, "table_title") <- c("Estimated Marginal Effects", "blue")
Expand Down
2 changes: 1 addition & 1 deletion R/get_emcontrasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ model_emcontrasts <- get_emcontrasts
...) {
# Gather info
predictors <- insight::find_predictors(model, effects = "fixed", flatten = TRUE, ...)
model_data <- insight::get_data(model)
model_data <- insight::get_data(model, verbose = FALSE)

# Guess arguments
if (is.null(contrast)) {
Expand Down
4 changes: 2 additions & 2 deletions R/get_emmeans.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ model_emmeans <- get_emmeans
means <- means[names(means) != "1"]

# Restore factor levels
means <- datawizard::data_restoretype(means, insight::get_data(model))
means <- datawizard::data_restoretype(means, insight::get_data(model, verbose = FALSE))


info <- attributes(estimated)
Expand All @@ -139,7 +139,7 @@ model_emmeans <- get_emmeans
...) {
# Gather info
predictors <- insight::find_predictors(model, effects = "fixed", flatten = TRUE, ...)
my_data <- insight::get_data(model)
my_data <- insight::get_data(model, verbose = FALSE)

# Guess arguments
if (!is.null(by) && length(by) == 1 && by == "auto") {
Expand Down
2 changes: 1 addition & 1 deletion R/get_emtrends.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ model_emtrends <- get_emtrends
...) {
# Gather info
predictors <- insight::find_predictors(model, effects = "fixed", flatten = TRUE, ...)
model_data <- insight::get_data(model)
model_data <- insight::get_data(model, verbose = FALSE)

# Guess arguments
if (is.null(trend)) {
Expand Down
4 changes: 2 additions & 2 deletions R/visualisation_recipe.estimate_predicted.R
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,10 @@ visualisation_recipe.estimate_predicted <- function(x,
# Utilities ---------------------------------------------------------------

.visualisation_recipe_getrawdata <- function(x, ...) {
rawdata <- insight::get_data(attributes(x)$model)
rawdata <- insight::get_data(attributes(x)$model, verbose = FALSE)

# Add response to data if not there
y <- insight::find_response(attributes(x)$model)
if (!y %in% names(rawdata)) rawdata[y] <- insight::get_response(attributes(x)$model)
if (!y %in% names(rawdata)) rawdata[y] <- insight::get_response(attributes(x)$model, verbose = FALSE)
rawdata
}
2 changes: 1 addition & 1 deletion tests/testthat/test-estimate_grouplevel.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test_that("estimate_grouplevel - lme4", {

reshaped <- reshape_grouplevel(random)
expect_equal(nrow(reshaped), nrow(data))
ref <- insight::get_data(model)[insight::find_random(model, split_nested = TRUE, flatten = TRUE)]
ref <- insight::get_data(model, verbose = FALSE)[insight::find_random(model, split_nested = TRUE, flatten = TRUE)]
all(reshaped$Subject == ref$Subject)
all(reshaped$grp == ref$grp)
all(reshaped$subgrp == ref$subgrp)
Expand Down

0 comments on commit e09de72

Please sign in to comment.