R/RecordGgplot.R

Defines functions RecordGgplot

Documented in RecordGgplot

#' RecordGgplot
#'
#' Description
#'
#' @param plotObj ggplot object
#'
#' @return recorded plot object
#'
#' @examples
#' \dontrun{
#' RecordGgplot(plotObj)
#' }
#'
#' @export
RecordGgplot <- function(plotObj)
{
  pdf(NULL)
  dev.control(displaylist = "enable")
  print(plotObj)
  pl <- recordPlot()
  invisible(dev.off())

  return(pl)
}
nextpagesoft/hivEstimatesAccuracyReloaded documentation built on March 14, 2020, 7:06 a.m.