Range | R Documentation |
Range class.
Range class.
A class for storing min/max range or value/tolerance.
new()
Initializer.
Range$new( min = NULL, max = NULL, value = NULL, delta = NULL, ppm = NULL, tol = NULL, tolType = c("delta", "plain", "ppm") )
min
The minimum value of the range.
max
The maximum value of the range.
value
The value.
delta
The delta tolerance.
ppm
The PPM tolerance.
tol
The tolerance value, whose type (ppm or delta) is specified by the "tolType" parameter.
tolType
The type of the tolerance value specified by the "tol" parameter.
Nothing.
# Create an instance from min and max: Range$new(min=1.2, max=1.5)
getValue()
Gets the middle value of the range.
Range$getValue()
The middle value.
getMin()
Gets the minimum value of the range.
Range$getMin()
The minimum value.
getMax()
Gets the maximum value of the range.
Range$getMax()
The maximum value.
getMinMax()
Get the min/max range.
Range$getMinMax()
A list containing two fields: "min" and "max.
getDelta()
Gets the delta tolerance of the range.
Range$getDelta()
The delta tolerance.
getPpm()
Gets the PPM tolerance of the range.
Range$getPpm()
The tolerance in PPM.
getTolExpr()
Gets the tolerance expression as a list.
Range$getTolExpr()
A list containing the tolerance range expression.
clone()
The objects of this class are cloneable with this method.
Range$clone(deep = FALSE)
deep
Whether to make a deep clone.
# Convert a min/max range into a value/ppm tolerance: rng <- Range$new(min=0.4, max=0.401) value <- rng$getValue() ppm <- rng$getPpm() ## ------------------------------------------------ ## Method `Range$new` ## ------------------------------------------------ # Create an instance from min and max: Range$new(min=1.2, max=1.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.