R/docr_examples.R

Defines functions docr.examples

docr.examples <- function(...){
  the_call <- deparse(substitute(...))
  the_call <- sprintf("# > %s", the_call)
  
  the_val <- capture.output(...)
  the_val <- stri_unescape_unicode(sprintf("# %s", the_val))
  
  cat(c("#", the_call,"#", the_val, "#"), sep = "\n")
}
CarlBoneri/taskr documentation built on June 1, 2017, 11:02 p.m.