process_and_shift_df: Process a data.frame A wrapper around 'check_df_variables',...

View source: R/miscellaneous-data-frame.R

process_and_shift_dfR Documentation

Process a data.frame A wrapper around check_df_variables, check_across_subset() and dplyr::pivot_longer().

Description

Process a data.frame

A wrapper around check_df_variables, check_across_subset() and dplyr::pivot_longer().

Usage

process_and_shift_df(
  df,
  variables = NULL,
  valid.classes = NULL,
  across = NULL,
  across.subset = NULL,
  relevel = TRUE,
  keep = NULL,
  ref_df = NULL,
  verbose = TRUE
)

Arguments

df

A data.frame.

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.

valid.classes

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

across

Character value. Specifies the discrete variable in the data.frame across which the variables of interest are to be analyzed or displayed.

across.subset

Character vector. The groups of interest that the grouping variable denoted in across contains.

If there are more groups you are interested in than they are groups 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.

relevel

Logical value. If set to TRUE the input order of across.subset and variables determines the order in which the groups of interest are displayed.

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.)


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