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

View source: R/checks.R

check_outcome_columnR Documentation

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
)

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)

Value

outcome colname

Author(s)

Kelly Sovacool, sovacool@umich.edu

Examples

## Not run: 
check_outcome_column(otu_small, NULL)
check_outcome_column(otu_small, "dx")

## End(Not run)

mikropml documentation built on Aug. 21, 2023, 5:10 p.m.