IncrementsRelative-class | R Documentation |
IncrementsRelative
IncrementsRelative
is the class for increments control based on relative
differences in intervals.
IncrementsRelative(intervals, increments)
.DefaultIncrementsRelative()
intervals |
( |
increments |
( |
intervals
(numeric
)
a vector with the left bounds of the relevant
intervals. For example, intervals = c(0, 50, 100)
specifies three intervals:
(0, 50)
, [50, 100)
and [100, +Inf)
. That means, the right
bound of the intervals are exclusive to the interval and the last interval
goes from the last value to infinity.
increments
(numeric
)
a vector of the same length with the maximum
allowable relative increments in the intervals
.
Typically, end users will not use the .DefaultIncrementsRelative()
function.
# This is the example of a rule for:
# maximum doubling the dose if the current dose is <20
# or only maximum increasing the dose by 1.33 if the current dose is >=20.
my_increments <- IncrementsRelative(
intervals = c(0, 20),
increments = c(1, 0.33)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.