| adjBy2ptReg | R Documentation |
This function performs linear rescaling of numeric data based on specified limits (ie a specified window). Values are adjusted to fit within a target range defined by 'regrTo'.
adjBy2ptReg(
dat,
lims,
regrTo = c(0.1, 0.9),
refLines = NULL,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
dat |
A numeric vector or matrix of values to adjust. |
lims |
A list of two numeric vectors, each of length 1 or 2, representing the lower and upper limits for rescaling. Example: 'lims = list(c(5, 9), c(60, 90))'. |
regrTo |
A numeric vector of length 2 defining the target range for rescaling (default: 'c(0.1, 0.9)'). |
refLines |
Optional numeric or character vector specifying reference lines (rows) in 'dat' to use for rescaling. If 'NULL', all rows are used. |
silent |
Logical. If 'TRUE', suppresses messages (default: |
debug |
Logical. If 'TRUE', prints debugging messages (default: |
callFrom |
Character string for tracking messages (default: |
Since this function shares significant overlap with scaleXY (which has more advanced options) it is rather suggested to use _scaleXY()_ instead.
The function _adjBy2ptReg()_ may het deprecated in the future.
This function returns a numeric vector or matrix with adjusted values.
set.seed(2016); dat1 <- round(runif(50, 0, 100), 1)
adjBy2ptReg(dat1, lims = list(c(5, 9), c(60, 90)))
plot(dat1, adjBy2ptReg(dat1, lims=list(c(5,9), c(60,90))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.