Skip to content

Commit

Permalink
styler
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jan 2, 2025
1 parent e637d6f commit 98f2f6a
Show file tree
Hide file tree
Showing 56 changed files with 5 additions and 219 deletions.
2 changes: 0 additions & 2 deletions R/check_autocorrelation.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ check_autocorrelation.default <- function(x, nsim = 1000, ...) {
}



# methods ------------------------------

#' @export
Expand Down Expand Up @@ -81,7 +80,6 @@ print.check_autocorrelation <- function(x, ...) {
}



# utilities -------------------------------

.durbWats <- function(.residuals) {
Expand Down
3 changes: 0 additions & 3 deletions R/check_clusterstructure.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ check_clusterstructure <- function(x,
}



#' @export
plot.check_clusterstructure <- function(x, ...) {
# Can be reimplemented with ggplot in see
Expand All @@ -88,7 +87,6 @@ plot.check_clusterstructure <- function(x, ...) {
}



#' @keywords internal
.clusterstructure_dm <- function(x, distance = "euclidean", method = "ward.D2") {
d <- stats::dist(x, method = distance)
Expand All @@ -97,7 +95,6 @@ plot.check_clusterstructure <- function(x, ...) {
}



#' @keywords internal
.clusterstructure_hopkins <- function(x, distance = "euclidean") {
# This is based on the hopkins() function from the clustertend package
Expand Down
9 changes: 0 additions & 9 deletions R/check_collinearity.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ check_collinearity <- function(x, ...) {
multicollinearity <- check_collinearity



# default ------------------------------

#' @rdname check_collinearity
Expand All @@ -159,7 +158,6 @@ check_collinearity.default <- function(x, ci = 0.95, verbose = TRUE, ...) {
}



# methods -------------------------------------------

#' @export
Expand Down Expand Up @@ -227,7 +225,6 @@ plot.check_collinearity <- function(x, ...) {
}



# other classes ----------------------------------

#' @export
Expand Down Expand Up @@ -303,7 +300,6 @@ check_collinearity.betaor <- check_collinearity.logitor
check_collinearity.betamfx <- check_collinearity.logitor



# zi-models -------------------------------------

#' @rdname check_collinearity
Expand Down Expand Up @@ -362,7 +358,6 @@ check_collinearity.zerocount <- function(x,
}



# utilities ---------------------------------

.check_collinearity_zi_model <- function(x, component, ci = 0.95, verbose = TRUE) {
Expand Down Expand Up @@ -412,7 +407,6 @@ check_collinearity.zerocount <- function(x,
}



.check_collinearity <- function(x, component, ci = 0.95, verbose = TRUE) {

Check warning on line 410 in R/check_collinearity.R

View workflow job for this annotation

GitHub Actions / lint / lint

file=R/check_collinearity.R,line=410,col=1,[cyclocomp_linter] Reduce the cyclomatic complexity of this function from 44 to at most 40.
v <- .safe(insight::get_varcov(x, component = component, verbose = FALSE))

Expand Down Expand Up @@ -586,7 +580,6 @@ check_collinearity.zerocount <- function(x,
}



.term_assignments <- function(x, component, verbose = TRUE) {
tryCatch(
{
Expand Down Expand Up @@ -622,7 +615,6 @@ check_collinearity.zerocount <- function(x,
}



.find_term_assignment <- function(x, component, verbose = TRUE) {
pred <- insight::find_predictors(x)[[component]]

Expand Down Expand Up @@ -657,7 +649,6 @@ check_collinearity.zerocount <- function(x,
}



.zi_term_assignment <- function(x, component = "zero_inflated", verbose = TRUE) {
tryCatch(
{
Expand Down
1 change: 0 additions & 1 deletion R/check_concurvity.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ check_concurvity.gam <- function(x, ...) {
}



# methods ---------------------------------

#' @export
Expand Down
5 changes: 0 additions & 5 deletions R/check_distribution.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ check_distribution <- function(model) {
}



# default -----------------------------

#' @export
Expand Down Expand Up @@ -106,7 +105,6 @@ check_distribution.default <- function(model) {
}



# methods --------------------------

#' @export
Expand Down Expand Up @@ -160,7 +158,6 @@ plot.check_distribution_numeric <- function(x, ...) {
}



# other classes -------------------

#' @export
Expand All @@ -184,7 +181,6 @@ check_distribution.numeric <- function(model) {
}



# utilities -----------------------------

.extract_features <- function(x, type = NULL) {
Expand Down Expand Up @@ -243,7 +239,6 @@ check_distribution.numeric <- function(model) {
}



.is_integer <- function(x) {
tryCatch(
ifelse(is.infinite(x), FALSE, x %% 1 == 0),
Expand Down
7 changes: 0 additions & 7 deletions R/check_factorstructure.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ check_factorstructure <- function(x, n = NULL, ...) {
}





#' @rdname check_factorstructure
#' @export
check_kmo <- function(x, n = NULL, ...) {
Expand Down Expand Up @@ -169,9 +166,6 @@ check_kmo <- function(x, n = NULL, ...) {
}





#' @rdname check_factorstructure
#' @export
check_sphericity_bartlett <- function(x, n = NULL, ...) {
Expand Down Expand Up @@ -213,7 +207,6 @@ check_sphericity_bartlett <- function(x, n = NULL, ...) {
}



# Helpers -----------------------------------------------------------------

#' @keywords internal
Expand Down
2 changes: 0 additions & 2 deletions R/check_heterogeneity_bias.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ check_heterogeneity_bias <- function(x, select = NULL, by = NULL, nested = FALSE
}




#' @export
print.check_heterogeneity_bias <- function(x, ...) {
cat("Possible heterogeneity bias due to following predictors: ")
Expand Down
2 changes: 0 additions & 2 deletions R/check_heteroscedasticity.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ check_heteroscedasticity.default <- function(x, ...) {
}



# methods -----------------------

#' @export
Expand Down Expand Up @@ -112,7 +111,6 @@ plot.check_heteroscedasticity <- function(x, ...) {
}



# utilities -----------------------

.sigma <- function(x) {
Expand Down
3 changes: 0 additions & 3 deletions R/check_homogeneity.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ check_homogeneity <- function(x, method = c("bartlett", "fligner", "levene", "au
}



# default -------------------------

#' @export
Expand Down Expand Up @@ -105,7 +104,6 @@ check_homogeneity.default <- function(x, method = c("bartlett", "fligner", "leve
}



# methods -----------------------

#' @export
Expand All @@ -130,7 +128,6 @@ plot.check_homogeneity <- function(x, ...) {
}



# other classes -----------------------------

#' @rdname check_homogeneity
Expand Down
1 change: 0 additions & 1 deletion R/check_htest.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ check_symmetry.htest <- function(x, ...) {
# }



# Print -------------------------------------------------------------------

#' @export
Expand Down
1 change: 0 additions & 1 deletion R/check_itemscale.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ check_itemscale <- function(x, factor_index = NULL) {
}



# methods -------------------------------------

#' @export
Expand Down
5 changes: 0 additions & 5 deletions R/check_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ check_model <- function(x, ...) {
}



# default ----------------------------

#' @rdname check_model
Expand Down Expand Up @@ -313,7 +312,6 @@ plot.check_model <- function(x, ...) {
}



# other classes ---------------------------

## TODO for now, convert to freq, see https://github.com/easystats/performance/issues/354
Expand Down Expand Up @@ -454,7 +452,6 @@ check_model.performance_simres <- function(x,
check_model.DHARMa <- check_model.performance_simres



# compile plots for checks of linear models ------------------------

.check_assumptions_linear <- function(model, model_info, check = "all", residual_type = "normal", verbose = TRUE, ...) {
Expand Down Expand Up @@ -515,7 +512,6 @@ check_model.DHARMa <- check_model.performance_simres
}



# compile plots for checks of generalized linear models ------------------------

.check_assumptions_glm <- function(model, model_info, check = "all", residual_type = "simulated", verbose = TRUE, ...) {
Expand Down Expand Up @@ -576,7 +572,6 @@ check_model.DHARMa <- check_model.performance_simres
}



# compile plots for checks of Bayesian models ------------------------

.check_assumptions_stan <- function(model, ...) {
Expand Down
8 changes: 0 additions & 8 deletions R/check_model_diagnostics.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
}



# prepare data for QQ plot ----------------------------------

.model_diagnostic_qq <- function(model, model_info = NULL, verbose = TRUE) {
Expand Down Expand Up @@ -88,7 +87,6 @@
}



# prepare data for random effects QQ plot ----------------------------------

.model_diagnostic_ranef_qq <- function(model, level = 0.95, model_info = NULL, verbose = TRUE) {
Expand Down Expand Up @@ -151,7 +149,6 @@
}



# prepare data for normality of residuals plot ----------------------------------

.model_diagnostic_normality <- function(model, verbose = TRUE) {
Expand All @@ -171,7 +168,6 @@
}



# prepare data for influential obs plot ----------------------------------

.model_diagnostic_outlier <- function(model, threshold = NULL) {
Expand Down Expand Up @@ -210,7 +206,6 @@
}



# prepare data for non-constant variance plot ----------------------------------

.model_diagnostic_ncv <- function(model, verbose = TRUE) {
Expand Down Expand Up @@ -238,7 +233,6 @@
}



# prepare data for homogeneity of variance plot ----------------------------------

.model_diagnostic_homogeneity <- function(model, verbose = TRUE) {
Expand Down Expand Up @@ -283,7 +277,6 @@
}



# prepare data for homogeneity of variance plot ----------------------------------

.new_diag_overdispersion <- function(model, ...) {
Expand Down Expand Up @@ -359,7 +352,6 @@
}



.model_diagnostic_overdispersion <- function(model, ...) {
faminfo <- insight::model_info(model)

Expand Down
1 change: 0 additions & 1 deletion R/check_multimodal.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ check_multimodal.data.frame <- function(x, ...) {
}



#' @export
check_multimodal.numeric <- function(x, ...) {
insight::check_if_installed("multimode")
Expand Down
3 changes: 0 additions & 3 deletions R/check_normality.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ check_normality <- function(x, ...) {
}



# default -------------------------

#' @export
Expand Down Expand Up @@ -184,7 +183,6 @@ print.check_normality <- function(x, ...) {
}



# other classes --------------------

# mixed models ---------------------
Expand Down Expand Up @@ -276,7 +274,6 @@ check_normality.afex_aov <- function(x, ...) {
check_normality.BFBayesFactor <- check_normality.afex_aov



# helper ---------------------

.check_normality <- function(x, model, type = "residuals") {
Expand Down
Loading

0 comments on commit 98f2f6a

Please sign in to comment.