tidy2.recipe: tidy2.recipe

View source: R/tidy2.R

tidy2.step_distributed_lagR Documentation

tidy2.recipe

Description

tidy2 will return a data frame that contains information regarding a recipe or operation within the recipe (when a tidy2 method for the operation exists). This method ensures that relevant data for predict_terms and response can be easily accessed from a recipe formulation.

Usage

## S3 method for class 'step_distributed_lag'
tidy2(x, ...)

## S3 method for class 'step_earthtide'
tidy2(x, ...)

## S3 method for class 'step_lead_lag'
tidy2(x, ...)

## S3 method for class 'recipe'
tidy2(x, number = NA, id = NA, ...)

## S3 method for class 'step'
tidy2(x, ...)

## S3 method for class 'check'
tidy2(x, ...)

## S3 method for class 'step_ns'
tidy2(x, ...)

## S3 method for class 'step_intercept'
tidy2(x, ...)

Arguments

x

A recipe object, step, or check (trained or otherwise).

...

Not currently used.

number

An integer or NA. If missing and id is not provided, the return value is a list of the operations in the recipe. If a number is given, a tidy method is executed for that operation in the recipe (if it exists). number must not be provided if id is.

id

A character string or NA. If missing and number is not provided, the return value is a list of the operations in the recipe. If a character string is given, a tidy method is executed for that operation in the recipe (if it exists). id must not be provided if number is.

Value

A tibble with columns that vary depending on what tidy2 method is executed. When number and id are NA, a tibble with columns number (the operation iteration), operation (either "step" or "check"), type (the method, e.g. 'lead_lag', 'distributed_lag'), a logical column called trained for whether the operation has been estimated using prep, a logical for skip, and a character column id.


hydrorecipes documentation built on June 27, 2022, 9:06 a.m.