Skip to content

Proposal of new function: build_manual() #1238

@twolodzko

Description

@twolodzko

As far as I know, devtools do not offer possibility to easily and directly build pdf manual. Maybe something like the function below could be added?

#' Create package manual
#' 
#' @param pkg package description, can be path or package name.  See
#'   \code{\link{as.package}} for more information
#' @param path path in which to produce package.  If \code{NULL}, defaults to
#'   the parent directory of the package.
#' 
#' @seealso \code{\link{RdUtils}} 
#' @export

build_manual <- function(pkg = ".", path = NULL) {
  pkg <- as.package(pkg)
  if (is.null(path)) {
    path <- dirname(pkg$path)
  }
  name <- paste0(pkg$package, "_", pkg$version, ".pdf", collapse = " ")
  system(paste0("R CMD Rd2pdf --force --output=", path, "/", name, " ", shQuote(pkg$path), collapse = " "))
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions