Skip to content

Commit

Permalink
Specify arg types; See #20
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed Dec 18, 2017
1 parent ca4ac25 commit d8cda8e
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions R/simpleCache.R
Expand Up @@ -38,45 +38,51 @@ NULL
#' environment variables you use in your instruction code. You can use this
#' using the parameter buildEnvir (just provide a list of named variables).
#'
#' @param cacheName Unique name for the cache. Be careful.
#' @param instruction Quoted R code to be evaluated. The returned value of this
#' @param cacheName A character vector for a unique name for the cache. Be careful.
#' @param instruction R expression (bracketed) to be evaluated. The returned value of this
#' code is what will be cached under the cacheName.
#' @param buildEnvir You may choose to provide additional variables necessary
#' for evaluating the code in instruction.
#' @param reload forces re-loading the cache, even if it exists in the env.
#' @param recreate forces reconstruction of the cache
#' @param noload noload is useful for: you want to create the caches, but not
#' load them if they aren't there (like a cache creation loop).
#' @param cacheDir The directory where caches are saved (and loaded from).
#' Defaults to the global \code{\link[=setCacheDir]{RCACHE.DIR}} variable
#' @param cacheSubDir You can specify a subdirectory within the \code{cacheDir}
#' variable. Defaults to \code{NULL}.
#' @param assignToVariable By default, \code{simpleCache} assigns the cache to a
#' @param buildEnvir An environment (or list) providing additional variables
#' necessary for evaluating the code in instruction.
#' @param reload Logical indicating whether to force re-loading the cache,
#' even if it exists in the env.
#' @param recreate Logical indicating whether to force reconstruction of the
#' cache
#' @param noload Logical indicating whether to create but not load the cache.
#' noload is useful for: you want to create the caches, but not load (like a
#' cache creation loop).
#' @param cacheDir Character vector specifying the directory where caches are
#' saved (and loaded from). Defaults to the variable set by
#' \code{\link[=setCacheDir]{setCacheDir()}}.
#' @param cacheSubDir Character vector specifying a subdirectory within the
#' \code{cacheDir} variable. Defaults to \code{NULL}.
#' @param assignToVariable Character vector for a variable name to load the
#' cache into. By default, \code{simpleCache} assigns the cache to a
#' variable named \code{cacheName}; you can overrule that here.
#' @param loadEnvir Into which environment would you like to load the
#' variable? Defaults to \code{\link[base]{parent.frame}}.
#' @param loadEnvir An environment. Into which environment would you like to
#' load the variable? Defaults to \code{\link[base]{parent.frame}}.
#' @param searchEnvir a vector of environments to search for the already loaded
#' cache.
#' @param timer Report how long it took to create the cache?
#' @param timer Logical indicating whether to report how long it took to create
#' the cache.
#' @param buildDir Location of Build files (files with instructions for use If
#' the instructions argument is not provided). Defaults to RBUILD.DIR
#' global option.
#' @param nofail By default, simpleCache throws an error if the instructions
#' fail. Use this option to convert this error into a warning. No cache will
#' be created, but simpleCache will not then hard-stop your processing. This
#' is useful, for example, if you are creating a bunch of caches and it's ok
#' if some of them do not complete.
#' is useful, for example, if you are creating a bunch of caches (for
#' example using \code{lapply}) and it's ok if some of them do not complete.
#' @param batchRegistry A \code{batchtools} registry object (built with
#' \code{\link[batchtools]{makeRegistry}}). If provided, this cache will be created on
#' the cluster using your batchtools configuration
#' @param batchResources A list of variables to provide to batchtools for
#' cluster resource managers. Used as the \code{res} argument to
#' \code{\link[batchtools]{batchMap}}
#' @param lifespan Numeric specifying the maximum age of cache, in days, to
#' allow before automatically triggering \code{recreate=TRUE}.
#' @param pepSettings Experimental untested feature.
#' @param ignoreLock Internal parameter used for batch job submission; don't
#' touch.
#' @param lifespan Maximum age of cache, in days, to allow before
#' automatically triggering \code{recreate=TRUE}.
#' @export
#' @example
#' R/examples/example.R
Expand Down

0 comments on commit d8cda8e

Please sign in to comment.