Skip to content

Add a source function to pull code into an empty environment #6

@MKatz-DHSC

Description

@MKatz-DHSC

Code should be as follows:

source_env <- function(file, local = NULL, ...) {
if (!is.null(local)) {
stop("source_env() does not take a local argument.")
}
env <- new.env(parent = baseenv())
source(file = file, local = env, ...)
return(env)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions