R/firepng.R

Defines functions firepng

Documented in firepng

#' The firepng function
#'
#' Print a R Graphics object to a file.
#'
#' @param path file path in quotes.
#' @param y the R graphics object, which needs to be saved as a .svg file.
#' @param w width in inches, defaults to 6
#' @param h height in inches, defaults to 4
#' @keywords firepng
#' @export
firepng <- function(path,y,w=6,h=4){
  png(filename=path,
      units="in",
      width=w,
      height=h,
      pointsize=10,
      res=300)
  print(y)
  dev.off()
}
deb-m/dmrpackages documentation built on Nov. 16, 2019, 12:03 a.m.