set.response: Choose a response to be preferred for plotting functions....

View source: R/2_helpers.R

set.responseR Documentation

Choose a response to be preferred for plotting functions. Will set 'SPEARobj$options$current.response.idx' (which can be set manually as well)

Description

Choose a response to be preferred for plotting functions. Will set 'SPEARobj$options$current.response.idx' (which can be set manually as well)

Usage

set.response(response = NULL)

Arguments

response

Which response to use? Can be an integer (which column number/index?) or string (which column name)? If string, must be found in 'colnames(SPEARobj$data$train$Y)'. Defaults to NULL ('1')

Examples

# Use the column number / index
SPEARobj$set.response(1)

# use the column name instead
SPEARobj$set.response("response_name")

jgygi/SPEAR documentation built on July 5, 2023, 5:35 p.m.