removeColumns: Remove Columns from a Data Frame

View source: R/column.R

removeColumnsR Documentation

Remove Columns from a Data Frame

Description

Remove Columns from a Data Frame

Usage

removeColumns(
  dframe,
  columns = NULL,
  columnsToRemove = NULL,
  pattern = NULL,
  drop = FALSE,
  dbg = FALSE
)

Arguments

dframe

data frame,

columns

vector of column names giving the columns to remove

columnsToRemove

deprecated. Use argument columns instead.

pattern

regular expression matching the names of the columns to be removed. Will only be evaluated if no explicit column names are given in columns.

drop

if FALSE, a data frame is returned in any case, otherwise the result may be a vector if only one column remains

dbg

if TRUE (the default is FALSE), the deletion of columns is reported on the screen

Value

dframe with columns given in columns being removed. User attributes of dframe are restored.


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.