Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

set_args

Change elements of a model specification


Description

set_args() can be used to modify the arguments of a model specification while set_mode() is used to change the model's mode.

Usage

set_args(object, ...)

set_mode(object, mode)

Arguments

object

A model specification.

...

One or more named model arguments.

mode

A character string for the model type (e.g. "classification" or "regression")

Details

set_args() will replace existing values of the arguments.

Value

An updated model object.

Examples

rand_forest()

rand_forest() %>%
  set_args(mtry = 3, importance = TRUE) %>%
  set_mode("regression")

parsnip

A Common API to Modeling and Analysis Functions

v0.1.5
GPL-2
Authors
Max Kuhn [aut, cre], Davis Vaughan [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.