select_vars: Select variables from a data frame based on a prefix

Description Usage Arguments Value Examples

View source: R/padis_general_functions.R

Description

Select variables from a data frame based on a prefix

Usage

1
select_vars(data, ids, prefix)

Arguments

data

The data frame to look for the variables

ids

The ID-variable(s) that should also be kept

prefix

The prefix or pattern of the variables that are taken along

Value

It returns a data frame that contains only a subset of the previous data frame

Examples

1
2
data <- mtcars
select_vars(data, "mpg", "^d.")

kthorstmann/padis documentation built on May 24, 2019, 5:01 a.m.