StackPrefixedCols: StackPrefixedCols(data, prefixes)

View source: R/Utility-Functions.R

StackPrefixedColsR Documentation

StackPrefixedCols(data, prefixes)

Description

Takes columns from data with specified prefixes and stacks them based on the unprefixed portion of the name. Columns not containing one of the prefixes are excluded in returned data.

Usage

StackPrefixedCols(data, prefixes)

Arguments

data

dataframe - contains data to stack

prefixes

string vector - list of prefixes to include in column selection and stacking

Value

tibble with superset of columns without prefixes in column names


pepfar-datim/data-pack-commons documentation built on April 26, 2024, 12:09 a.m.