Skip to content

Commit 1cfb801

Browse files
remove redundant comment
1 parent fb7efec commit 1cfb801

18 files changed

+7
-22
lines changed

R/check_autocorrelation.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ check_autocorrelation <- function(x, ...) {
2929
#' @rdname check_autocorrelation
3030
#' @export
3131
check_autocorrelation.default <- function(x, nsim = 1000, ...) {
32-
# check for valid input
3332
.is_model_valid(x)
3433

3534
.residuals <- stats::residuals(x)

R/check_collinearity.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ multicollinearity <- check_collinearity
145145
#' @rdname check_collinearity
146146
#' @export
147147
check_collinearity.default <- function(x, ci = 0.95, verbose = TRUE, ...) {
148-
# check for valid input
149148
.is_model_valid(x)
150149
.check_collinearity(x, component = "conditional", ci = ci, verbose = verbose)
151150
}

R/check_convergence.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ check_convergence <- function(x, tolerance = 0.001, ...) {
7676

7777
#' @export
7878
check_convergence.default <- function(x, tolerance = 0.001, ...) {
79-
# check for valid input
8079
.is_model_valid(x)
8180
message(sprintf("`check_convergence()` does not work for models of class '%s'.", class(x)[1]))
8281
}

R/check_distribution.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ check_distribution <- function(model) {
6666

6767
#' @export
6868
check_distribution.default <- function(model) {
69-
# check for valid input
7069
.is_model_valid(model)
7170

7271
insight::check_if_installed("randomForest")

R/check_heteroscedasticity.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ check_heteroskedasticity <- check_heteroscedasticity
4646

4747
#' @export
4848
check_heteroscedasticity.default <- function(x, ...) {
49-
# check for valid input
5049
.is_model_valid(x)
5150

5251
# only for linear models

R/check_itemscale.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
#' )
6767
#' @export
6868
check_itemscale <- function(x, factor_index = NULL) {
69-
# check for valid input
7069
if (!inherits(x, c("parameters_pca", "data.frame"))) {
7170
insight::format_error(
7271
"`x` must be an object of class `parameters_pca`, as returned by `parameters::principal_components()`, or a data frame." # nolint

R/check_normality.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ check_normality <- function(x, ...) {
5555

5656
#' @export
5757
check_normality.default <- function(x, ...) {
58-
# check for valid input
5958
.is_model_valid(x)
6059

6160
if (!insight::model_info(x)$is_linear) {

R/check_overdispersion.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ check_overdispersion <- function(x, ...) {
7777

7878
#' @export
7979
check_overdispersion.default <- function(x, ...) {
80-
# check for valid input
8180
.is_model_valid(x)
8281
insight::format_error(
8382
paste0("`check_overdisperion()` not yet implemented for models of class `", class(x)[1], "`.")

R/check_predictions.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ check_predictions.default <- function(object,
100100
type = "density",
101101
verbose = TRUE,
102102
...) {
103-
# check for valid input
104103
.is_model_valid(object)
105104

106105
# retrieve model information

R/model_performance.bayesian.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ model_performance.stanreg <- function(model, metrics = "all", verbose = TRUE, ..
7979
metrics <- c("LOOIC", "WAIC", "R2", "RMSE")
8080
}
8181

82-
# check for valid input
82+
8383
metrics <- toupper(.check_bad_metrics(metrics, all_metrics, verbose))
8484

8585
algorithm <- insight::find_algorithm(model)
@@ -232,7 +232,7 @@ model_performance.BFBayesFactor <- function(model,
232232
metrics <- all_metrics
233233
}
234234

235-
# check for valid input
235+
236236
metrics <- toupper(.check_bad_metrics(metrics, all_metrics, verbose))
237237

238238
# check for valid BFBayesFactor object

R/model_performance.bife.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ model_performance.bife <- function(model, metrics = "all", verbose = TRUE, ...)
1111
metrics <- c("AIC", "R2")
1212
}
1313

14-
# check for valid input
14+
1515
metrics <- .check_bad_metrics(metrics, all_metrics, verbose)
1616

1717
info <- insight::model_info(model)

R/model_performance.ivreg.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ model_performance.ivreg <- function(model, metrics = "all", verbose = TRUE, ...)
2424
metrics <- c("AIC", "BIC", "R2", "R2_adj", "RMSE")
2525
}
2626

27-
# check for valid input
27+
2828
metrics <- .check_bad_metrics(metrics, all_metrics, verbose)
2929

3030
# the lm-method does not accept ivreg-specific metrics

R/model_performance.lm.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ model_performance.lm <- function(model, metrics = "all", verbose = TRUE, ...) {
5858
insight::formula_ok(model)
5959
}
6060

61-
# check for valid input
61+
6262
metrics <- .check_bad_metrics(metrics, all_metrics, verbose)
6363
info <- suppressWarnings(insight::model_info(model, verbose = FALSE))
6464

R/model_performance.mixed.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ model_performance.merMod <- function(model,
5757
metrics <- c("AIC", "BIC", "R2", "ICC", "RMSE")
5858
}
5959

60-
# check for valid input
60+
6161
metrics <- .check_bad_metrics(metrics, all_metrics, verbose)
6262

6363
# check model formula

R/model_performance_default.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#' @export
22
model_performance.default <- function(model, metrics = "all", verbose = TRUE, ...) {
3-
# check for valid input
43
.is_model_valid(model)
54

65
if (any(tolower(metrics) == "log_loss")) {
@@ -16,7 +15,7 @@ model_performance.default <- function(model, metrics = "all", verbose = TRUE, ..
1615
metrics <- c("AIC", "BIC", "R2", "R2_adj", "RMSE")
1716
}
1817

19-
# check for valid input
18+
2019
metrics <- .check_bad_metrics(metrics, all_metrics, verbose)
2120

2221
if (!insight::is_model(model) || !insight::is_model_supported(model)) {
@@ -32,7 +31,6 @@ model_performance.default <- function(model, metrics = "all", verbose = TRUE, ..
3231

3332

3433
.check_bad_metrics <- function(metrics, all_metrics, verbose = TRUE) {
35-
# check for valid input
3634
bad_metrics <- which(!metrics %in% all_metrics)
3735
if (length(bad_metrics)) {
3836
if (verbose) {

R/performance_aicc.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ performance_aic <- function(x, ...) {
6969
#' @rdname performance_aicc
7070
#' @export
7171
performance_aic.default <- function(x, estimator = "ML", verbose = TRUE, ...) {
72-
# check for valid input
7372
.is_model_valid(x)
7473

7574
info <- list(...)$model_info
@@ -203,7 +202,6 @@ AIC.bife <- function(object, ..., k = 2) {
203202

204203
#' @export
205204
performance_aicc.default <- function(x, estimator = "ML", ...) {
206-
# check for valid input
207205
.is_model_valid(x)
208206

209207
# check ML estimator

R/performance_logloss.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ performance_logloss <- function(model, verbose = TRUE, ...) {
3030

3131
#' @export
3232
performance_logloss.default <- function(model, verbose = TRUE, ...) {
33-
# check for valid input
3433
.is_model_valid(model)
3534

3635
resp <- .recode_to_zero(insight::get_response(model, verbose = verbose))

R/performance_mae.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ mae <- performance_mae
2525

2626
#' @export
2727
performance_mae.default <- function(model, verbose = TRUE, ...) {
28-
# check for valid input
2928
.is_model_valid(model)
3029

3130
pred <- .safe(insight::get_predicted(model, ci = NULL, verbose = verbose, ...))

0 commit comments

Comments
 (0)