select_columns: Keep only specific columns in a data frame

View source: R/clean_data.R

select_columnsR Documentation

Keep only specific columns in a data frame

Description

This function can be used when, apart from the standardized columns, there is a selection of columns in the data frame that should be kept around. The function was written because columns can create conflicts when multiple data frames are joined that carry columns with the same name but different data types. Removing excess columns prevents this.

Usage

select_columns(data, col_keep)

Arguments

data

data frame

col_keep

vector with column names that should be kept

Value

a data frame with reduced number of columns


bvreede/OAmonitor documentation built on Sept. 9, 2023, 8:33 p.m.