R/add_spm_dir.R

Defines functions add_spm_dir

Documented in add_spm_dir

#' Add SPM Directory
#'
#' @param x Character vector of commands
#' @param spmdir SPM Directory
#' @param verbose Print diagnostic messages
#'
#' @return A character vector
#' @export
add_spm_dir = function(
  x, 
  spmdir = spm_dir(verbose = verbose),
  verbose = TRUE) {
  if (verbose) {
    message(paste0("# Adding SPMDIR: ", spmdir, "\\n"))
  }
  x = c(
    paste0("addpath(genpath('", 
           spmdir, "'));"),
    x)
  return(x)
}

#' @rdname add_spm_dir
#' @export
add_spm12_dir = add_spm_dir

Try the spm12r package in your browser

Any scripts or data that you put into this service are public.

spm12r documentation built on March 4, 2021, 9:11 a.m.