validate_data_cor: Validate Data for Correlation Analysis

View source: R/validate.R

validate_data_corR Documentation

Validate Data for Correlation Analysis

Description

Internal function to assess whether the input arguments df and predictors result in data dimensions suitable for pairwise correlation analysis.

If the number of rows in df is smaller than 10, an error is issued.

Usage

validate_data_cor(
  df = NULL,
  predictors = NULL,
  function_name = "collinear::validate_data_cor()",
  quiet = FALSE
)

Arguments

df

(required; data frame, tibble, or sf) A data frame with responses and predictors. Default: NULL.

predictors

(optional; character vector) Names of the predictors to select from df. If omitted, all numeric columns in df are used instead. If argument response is not provided, non-numeric variables are ignored. Default: NULL

function_name

(optional, character string) Name of the function performing the check. Default: "collinear::validate_data_cor()"

quiet

(optional; logical) If FALSE, messages generated during the execution of the function are printed to the console Default: FALSE

Value

character vector: predictors names

See Also

Other data_validation: validate_data_vif(), validate_df(), validate_encoding_arguments(), validate_predictors(), validate_preference_order(), validate_response()


collinear documentation built on April 12, 2025, 1:36 a.m.