preprocess_varnames: Preprocess data.frame variable names

View source: R/char_utils.R

preprocess_varnamesR Documentation

Preprocess data.frame variable names

Description

Function to preprocess variable names useful for a data.frame. If a char is given a char is correct char is given back, if a data.frame the same data.frame with corrected names.

Usage

preprocess_varnames(x = NULL, trim = NULL, dump_rev = TRUE)

Arguments

x

a data.frame or its (col)names

trim

character length of trimming. If NULL (default) trimming is disabled.

dump_rev

print a matrix with the reverse renaming. It can be used with recode (back to original names?) or comment_df (if original names are to be used as comments)

Details

This function was created to make automatic variable name creation from Excel files obtained by others.


lbraglia/lbmisc documentation built on April 29, 2024, 11:27 a.m.