keepCols: Keep columns from a dataframe

View source: R/keepCols.R

keepColsR Documentation

Keep columns from a dataframe

Description

Function to keep columns from a dataframe

Usage

keepCols(tbl, cols, debug = FALSE)

Arguments

tbl
  • dataframe with columns to keep or discard

cols
  • vector of column names to keep

debug
  • flag (T/F) to print debugging info

Details

  Creates a dataframe containing the specified subset of columns of input dataframe "tbl" by
  keeping only columns matching the specified names.

Value

a dataframe with columns to be kept, or NULL if no column names matched.


wStockhausen/wtsUtilities documentation built on Feb. 3, 2025, 6:29 a.m.