scope | R Documentation |
Parses the input, and explicitly adds namespace access where appropriate.
scope(x, envir = caller_env(), ...) ## Default S3 method: scope(x, envir = caller_env(), ...) ## S3 method for class 'character' scope(x, envir = caller_env(), ...) ## S3 method for class ''function'' scope( x, envir = get_env(x) %||% caller_env(), useSource = TRUE, inPackage = TRUE, ... ) ## S3 method for class 'call' scope(x, envir = caller_env(), ...) ## S3 method for class 'quosure' scope(x, envir = quo_get_env(x) %||% caller_env(), ...)
x |
A character vector of parseable code, a call, a quosure, or a function. |
envir |
An environment in which the expression should be evaluated.
Defaults to the enclosing environment if |
Returns a [ParseTreeScoper] object which prints the modified code.
# Unchanged scope(1) scope("a") # Modified library(colonoscopy) scope(scope)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.