new_step: Add a new 'processing_step'

Description Usage Arguments Value Examples

View source: R/processing_template.R

Description

Add a new processing_step

Usage

1
2
3
4
new_step(...)

## S3 method for class 'processing_template'
new_step(x, fun, arglist, name = "none", id = NULL, ...)

Arguments

...

further arguments passed to or from other methods(not currenctly used).

x

A processing_template object

fun

either a function or a non-empty character string naming the function to be called.

arglist

a list of arguments to the function call. The names attribute of args gives the argument names.

name

A string description of the step

id

An id associated with the step. Will be converted to a unique id.

Value

A list-like object storing processing steps.

Examples

1
2
3
4
5
6
library(tidySpectR)

template <- processing_template() %>%
            new_step(mask, list(from = 5, to = Inf), name = "mask") %>%
            new_step(bucket_uniform, list(N = 10), name = "bucket")
template

CVUA-RRW/tidySpectR documentation built on April 13, 2021, 11:41 a.m.