Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nanxstats committed Apr 11, 2017
1 parent 7723604 commit 8cace58
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 21 deletions.
15 changes: 4 additions & 11 deletions R/addins.R
Original file line number Diff line number Diff line change
@@ -1,48 +1,41 @@
#' RStudio Addin: Containerize R Markdown Document
#'
#' Call this function as an addin to dockerize (lift) the current document.
#' RStudio addin for containerizing the current document.
#'
#' @importFrom rstudioapi getActiveDocumentContext
#'
#' @keywords internal
addin_lift = function() {

context = rstudioapi::getActiveDocumentContext()
path = normalizePath(context$'path')
lift(path)

}

#' RStudio Addin: Containerize and Render R Markdown Document with Docker
#'
#' Call this function as an addin to containerize and render
#' the current document.
#' RStudio addin for containerizing and rendering the current document.
#'
#' @importFrom rstudioapi getActiveDocumentContext
#'
#' @keywords internal
addin_lift_render_docker = function() {

context = rstudioapi::getActiveDocumentContext()
path = normalizePath(context$'path')
lift(path)
render_docker(path)

}

#' RStudio Addin: Purge Docker Image
#'
#' Call this function as an addin to removes the Docker image used
#' for rendering the current document.
#' RStudio addin for removing the Docker image used for
#' rendering the current document.
#'
#' @importFrom rstudioapi getActiveDocumentContext
#'
#' @keywords internal
addin_purge_image = function() {

context = rstudioapi::getActiveDocumentContext()
path = normalizePath(context$'path')
path = paste0(file_dir(path), '/', file_name_sans(path), '.docker.yml')
purge_image(path)

}
7 changes: 4 additions & 3 deletions R/liftr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
#'
#' @name liftr-package
#' @docType package
#' @author Nan Xiao <\email{me@@nanx.me}>
#' Miaozhu Li <\email{miaozhu.li@@duke.edu}>
#' Tengfei Yin <\email{tengfei.yin@@sevenbridges.com}>
#' @author
#' Nan Xiao <\email{me@@nanx.me}>
#' Miaozhu Li <\email{miaozhu.li@@duke.edu}>
#' Tengfei Yin <\email{tengfei.yin@@sevenbridges.com}>
#'
NULL
2 changes: 1 addition & 1 deletion man/addin_lift.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/addin_lift_render_docker.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/addin_purge_image.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/liftr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8cace58

Please sign in to comment.