generic_C_interface: Generic C interface

Description Usage Arguments Examples

View source: R/C_interfaces.R

Description

Generic interface for C-functions with inputs (values, times, length(values), ...) and output (values_new). Example: sma, rolling_max, ema, ...

Usage

1

Arguments

x

a numeric "uts" object with finite, non-NA observation values.

C_fct

the name of the C function to call.

...

further arguments passed to the C function.

Examples

1
2
3
4
5
6
# SMA_last
generic_C_interface(ex_uts(), "sma_last", width_before=ddays(1), width_after=ddays(0))

# One- vs. two-sided window
generic_C_interface(ex_uts(), "rolling_num_obs", width_before=dhours(6), width_after=dhours(0))
generic_C_interface(ex_uts(), "rolling_num_obs", width_before=dhours(6), width_after=dhours(6))

andreas50/utsOperators documentation built on May 25, 2019, 7:16 a.m.