R - zapsmall(): drop values to zero

26 Aug 2017

values closed to zero (to a certain number) are treated as zero

x1 <- c(52938, 1928, 12, 2, 0.0053)
y  <- c(52938, 1928, 12, 2, 0)
all(zapsmall(x1, 6) - y == 0)

viewed on http://www.rfunction.com/

[ R  function  ]