View source: R/augment-hai-hyperbolic.R
hai_hyperbolic_augment | R Documentation |
Takes a numeric vector(s) or date and will return a tibble of one of the following:
"sin"
"cos"
"tan"
"sincos"
c("sin","cos","tan", "sincos")
hai_hyperbolic_augment(
.data,
.value,
.names = "auto",
.scale_type = c("sin", "cos", "tan", "sincos")
)
.data |
The data being passed that will be augmented by the function. |
.value |
This is passed |
.names |
The default is "auto" |
.scale_type |
A character of one of the following: "sin","cos","tan", "sincos" All can be passed by setting the param equal to c("sin","cos","tan","sincos") |
Takes a numeric vector or date and will return a vector of one of the following:
"sin"
"cos"
"tan"
"sincos"
c("sin","cos","tan", "sincos")
This function is intended to be used on its own in order to add columns to a tibble.
A augmented tibble
Steven P. Sanderson II, MPH
Other Augment Function:
hai_fourier_augment()
,
hai_fourier_discrete_augment()
,
hai_polynomial_augment()
,
hai_scale_zero_one_augment()
,
hai_scale_zscore_augment()
,
hai_winsorized_move_augment()
,
hai_winsorized_truncate_augment()
suppressPackageStartupMessages(library(dplyr))
len_out <- 10
by_unit <- "month"
start_date <- as.Date("2021-01-01")
data_tbl <- tibble(
date_col = seq.Date(from = start_date, length.out = len_out, by = by_unit),
a = rnorm(len_out),
b = runif(len_out)
)
hai_hyperbolic_augment(data_tbl, b, .scale_type = "sin")
hai_hyperbolic_augment(data_tbl, b, .scale_type = "tan")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.