Description Usage Format Value Methods Examples
Class providing a constant parameter object with methods to calculate the integral of the parameter and the squared parameter over a time span.
1 |
R6Class
object.
Object of R6Class
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
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.