R/round2.R

Defines functions round2

round2 <- function(x, n=0) {
  posneg = sign(x)
  z = abs(x)*10^n
  z = z + 0.5
  z = trunc(z)
  z = z/10^n
  z*posneg
}
leandromarino/CesgTools documentation built on May 25, 2022, 5:03 a.m.