Learn R Programming

mikropml (version 1.6.1)

check_outcome_column: Check that outcome column exists. Pick outcome column if not specified.

Description

Check that outcome column exists. Pick outcome column if not specified.

Usage

check_outcome_column(
  dataset,
  outcome_colname,
  check_values = TRUE,
  show_message = TRUE
)

Value

outcome colname

Arguments

dataset

Data frame with an outcome variable and other columns as features.

outcome_colname

Column name as a string of the outcome variable (default NULL; the first column will be chosen automatically).

check_values

whether to check the outcome values or just get the column (default:TRUE)

show_message

whether to show which column is being used as the output column (default: TRUE)

Author

Kelly Sovacool, sovacool@umich.edu

Examples

Run this code
if (FALSE) {
check_outcome_column(otu_small, NULL)
check_outcome_column(otu_small, "dx")
}

Run the code above in your browser using DataLab