generate_col: Function that somehow generates a new column called...

Description Usage Arguments Value

View source: R/import-data.R

Description

Function that somehow generates a new column called "new_col_name" from the old column, called "col_name". splitFunc is a function that accepts a vector, and returns a new vector. This function is intended to do things like split sample names from the default values that are multipart and full of "_"s.

Usage

1
generate_col(d, col_name, new_col_name, splitFunc)

Arguments

d

Input data frame needing new_col_name from col_name

col_name

The name of the column to use in generating the new one.

new_col_name

What are we going to name the new column.

splitFunc

Takes a single vector, returns a single vector, and contains the column creation logic.

Value

A copy of the input dataframe d, with the new column appended


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