R/round.bnd.R

Defines functions smooth.bnd

Documented in smooth.bnd

smooth.bnd <- function(map, digits = 2, scale = 1) {
  if (!inherits(map, "bnd")) 
    stop("Argument 'map' is not an object of class 'bnd'!")
  nrpolys <- length(map)
  for (i in 1:nrpolys) {
    temp <- unique(round(map[[i]] * scale, digits)/scale)
    if (nrow(temp) > 3) 
      map[[i]] <- temp
  }
  class(map) <- "bnd"
  return(map)
}

Try the BayesX package in your browser

Any scripts or data that you put into this service are public.

BayesX documentation built on Oct. 20, 2023, 9:11 a.m.