constant_parameters: Constant parameter class

Description Usage Format Value Methods Examples

Description

Class providing a constant parameter object with methods to calculate the integral of the parameter and the squared parameter over a time span.

Usage

1

Format

R6Class object.

Value

Object of R6Class

Methods

integral

Calculates the integral given the initial and final times. The arguments are two timeDate object with the initial and final times. It returns a numeric scalar with the integral

integral_square (public)

Calculates the integral of the squared constant parameter given the initial and final times. The arguments are two timeDate object with the initial and final times. It returns a numeric scalar with the integral

get (public)

get the constant

Examples

1
2
3
4
5
r <- constant_parameters$new(0.01)
#Over the full year (365 days) the integral should evaluate to 0.01
r$integral(timeDate::timeDate("2016-07-09"), timeDate::timeDate("2017-07-09"))
#Over the full year the integral square should evaluate to 0.001
r$integral_square(timeDate::timeDate("2016-07-09"), timeDate::timeDate("2017-07-09"))

valuer documentation built on May 2, 2019, 3:43 p.m.