determine_relevant_columns: Get X and Y columns

Description Usage Arguments Examples

View source: R/random_rotation.R

Description

Returns columns for X matrix and Y vector (and ignored cols) from the input, given set of in-/exclusions

Usage

1
determine_relevant_columns(df, response, exclude = NULL, include = NULL)

Arguments

df

data frame

response

index (integer) or column name of class (response)

exclude

vector or list of indices (integer) and/or column names that should be excluded (default: NULL)

include

vector or list of indices (integer) and/or column names that should ONLY be included (default: NULL)

Examples

1
2
3
determine_relevant_columns(df, response="myY")
determine_relevant_columns(df, response="myY", exclude=c("col1", "col9"))
determine_relevant_columns(df, response=5, include=list(2,3,4, "col10"))

randomrotation/random.rotation documentation built on Dec. 31, 2020, 2:15 a.m.