update_blueprint: Update a preprocessing blueprint

Description Usage Arguments Examples

View source: R/blueprint.R

Description

update_blueprint() is the correct way to alter elements of an existing blueprint object. It has two benefits over just doing blueprint$elem <- new_elem.

Usage

1
update_blueprint(blueprint, ...)

Arguments

blueprint

A preprocessing blueprint.

...

Name-value pairs of existing elements in blueprint that should be updated.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
blueprint <- default_xy_blueprint()

# `intercept` defaults to FALSE
blueprint

update_blueprint(blueprint, intercept = TRUE)

# Can't update non-existent elements
try(update_blueprint(blueprint, intercpt = TRUE))

# Can't add non-valid elements
try(update_blueprint(blueprint, intercept = 1))

DavisVaughan/hardhat documentation built on Oct. 5, 2021, 9:53 a.m.