R/resetpar.R

Defines functions resetpar

Documented in resetpar

#' resetpar
#'
#' Resets the par if necessary.
#'
#' @param oldpar graphical parameters
#'
#' @return nothing
#' @export
#'
#' @examples
#' # no examples
resetpar <- function(oldpar) {
  suppressWarnings({
    curpar <- graphics::par(no.readonly = TRUE)
    if (!identical(oldpar, curpar)) graphics::par(oldpar)
  })
}
sigbertklinke/smvgraph documentation built on Dec. 10, 2022, 9:13 a.m.