minmax | R Documentation |
This function creates a context (i.e. an instance of S3 class
ctx3()
, ctx3bilat()
, ctx5()
, or ctx5bilat()
) based on values
of the numeric vector x
. In default, the context is based on minimum
and maximum value of x
in the following way:
ctx3
, ctx5
: low = minimum, high = maximum value of x
;
ctx3bilat
, ctx5bilat
: negMax = minimum, max = maximum value of x
,
origin = mean of minimum and maximum.
minmax(x, type = c("ctx3", "ctx5", "ctx3bilat", "ctx5bilat"), ...)
x |
A numeric vector to compute the context from |
type |
A type of the context to be returned. Must be one of:
|
... |
other parameters to be passed to the appropriate constructor
( |
Other values are computed accordingly to defaults as defined in the constructors
ctx3()
, ctx3bilat()
, ctx5()
, and ctx5bilat()
).
minmax(0:100) # returns ctx3: 0, 50, 100
minmax(0:100, high=80) # returns ctx3: 0, 40, 80
minmax(0:100, relCenter=0.4) # returns ctx3: 0, 40, 100
minmax(0:100, type='ctx5') # returns ctx5: 0, 25, 50, 75, 100
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.