trnc {aakmisc} | R Documentation |
Truncate to the specified window.
trnc(x, range = c(0, 1), only.finite = TRUE)
x |
Numeric vector of values to manipulate. |
range |
Numeric vector of length two giving desired output range. |
only.finite |
if TRUE (the default), will only modify finite values. |
trnc
is a function for truncating data to a specified window.
It is suitable for use in scale_{x,y}_{continuous,discrete}
, for example.
trnc(c(-1,0.5,1,2,NA))