check_df_variables: Data.frame variable check

View source: R/input-check.R

check_df_variablesR Documentation

Data.frame variable check

Description

Selects the variables denoted in keep and variables. The letter ones are checked for validity. If variables is set to NULL all valid variables are kept.

Usage

check_df_variables(
  df,
  valid.classes,
  variables = NULL,
  keep = NULL,
  ref_df = NULL,
  verbose = TRUE
)

Arguments

df

A data.frame.

valid.classes

Character vector to specify the classes the input might have in order not to be discarded.

variables

Character vector. Specifies the variables of interest. If set to NULL all valid variables of the input data.frame are considered (as long as the total number does not exceeds the limit).

If there are more variables you are interested in than they are variables you are not interested in specify those that you are not interested in prefixed with an '-'. Variables prefixed that way are discarded and the remaining are kept.

keep

Character vector or NULL. If character, specifies variables that are to be kept even if they are not of those classes denoted in valid.classes. Variables specified like that are not included in the pivoting process!

ref_df

Character value. Given to argument ref of function check_data_frame().

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

Value

The input df with all selected variables.


kueckelj/confuns documentation built on June 28, 2024, 9:19 a.m.