affine.map | R Documentation |
affinely maps 1D points in vector x from interval xlim to interval ylim, ie takes points that lie in interval xlim and mapping onto interval ylim using linear / affine map defined by: (x0,y0) = c(xlim(1), ylim(1)), (x1,y1) = c(xlim(2), ylim(2)) (using two point formula for line) useful for plotting.
if cap.max or cap.min == T then values outside of the range will be capped at min or max
affine.map(
x,
ylim = c(0, 1),
xlim = c(min(x), max(x)),
cap = F,
cap.min = cap,
cap.max = cap,
clip = T,
clip.min = clip,
clip.max = clip
)
Marcin Imielinski
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.