R/open-intro.R

Defines functions intro_to_Rmd

Documented in intro_to_Rmd

#' Introduction to RMarkdown
#' 
#' Opens an Introducion to R Markdown PDF for viewing.
#' 
#' @return Nothing, invisibly.
#' 
#' @examples 
#' \dontrun{intro_to_Rmd()}
#' 
#' @export

intro_to_Rmd <- function() {
  stopifnot(interactive())
  file = find_resource('assignment', 'documentation/intro-to-rmd.pdf')
  
  if (Sys.info()[1] %in% 'Windows') {
    system2('start', args = file, wait = FALSE)
  } else {
    system2('open', args = file, wait = FALSE)
  }
  invisible()
}
mattwarkentin/CHL5201 documentation built on March 2, 2020, 5:33 a.m.