alter_cols: Function that uniformly applies the same change to many...

Description Usage Arguments Value

View source: R/import-data.R

Description

Function that uniformly applies the same change to many columns. Intended to do things like converting character columns to numeric ones.

Usage

1
alter_cols(d, col_finder, alterFunc)

Arguments

d

Input data frame needing column alteration.

col_finder

Take the whole data frame (d here) and return a vector of numeric indices of columns to alter.

alterFunc

Takes a single vector, returns a single vector that is an altered copy.

Value

A copy of the input data frame d with the given columns altered.


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