remove_cols: Function removes columns from input data frame d, returning a...

Description Usage Arguments Value

View source: R/import-data.R

Description

Function removes columns from input data frame d, returning a data frame without them

Usage

1
remove_cols(d, funcList, inds = NULL)

Arguments

d

Input data frame needing columns removed

funcList

A list of functions that each yield column indices to be removed. Called with dataframe as input. Joined with union.

inds

A vector of indexes to consider for removal. Useful for guaranteeing that id info won't be removed etc. The final list of columns to remove is intersected with this list. This can also be a function that is called with the data frame d, and returns a vector of indices (such as the 'span' function above).

Value

The input data frame d but missing the unwanted columns


interzoneboy/MS-prep documentation built on June 13, 2020, 7:03 a.m.