rm_id_like_columns: Remove ID-like columns.

View source: R/preprocessing_removal.R

rm_id_like_columnsR Documentation

Remove ID-like columns.

Description

The columns are perceived as ID-like, when they are present in the id_names vector fo strings or the column values are unique integers.

Usage

rm_id_like_columns(
  data,
  id_names = c("id", "nr", "number", "idx", "identification", "index"),
  verbose = FALSE
)

Arguments

data

A data source, that is one of the major R formats: data.table, data.frame, matrix, and so on.

id_names

A vector of strings indicating which column names are perceived as ID-like. By default the list is: ['id', 'nr', 'number', 'idx', 'identification', 'index'].

verbose

A logical value, if set to TRUE, provides all information about preprocessing process, if FALSE gives none.

Value

A list containing two objects

  • `data` A dataset with deleted columns.

  • `idx` The indexes of removed columns.


ModelOriented/forester documentation built on June 6, 2024, 7:29 a.m.