regularize.interval {swfdr} | R Documentation |
(This is a simpler/faster implementation than with ifelse)
regularize.interval(x, interval = c(0, 1))
x |
numeric vector or matrix |
interval |
numeric vector of length 2 with min/max values |
same object like x, with values truncated by [0,1]