Framework for R

Notebooks & Scripts

stubs_path()

Get Path to Stub Templates Directory

Returns the path to the user's stubs directory, or the framework stubs directory if no user stubs exist.

Usage

stubs_path(which = "auto")

Arguments

Name Description
which

Character. Which directory to return:

  • "user" - User's project stubs directory (stubs/)
  • "framework" - Framework's built-in stubs directory
  • "auto" (default) - User directory if it exists, otherwise framework

Value

Character path to stubs directory

Examples

if (FALSE) {
# Get active stubs directory
stubs_path()
# Get framework stubs directory
stubs_path("framework")
# Get user stubs directory
stubs_path("user")
}