prSource {tinyProject}R Documentation

Source a R script

Description

Source a R script in the "scripts" folder of the project.

Usage

prSource(name, subdir = ".")

Arguments

name

Name of the script to execute. It can also contain the subfolder where the script is stored.

subdir

subdirectory where the script is located. The subdirectory can also be directly specified in the parameter name.

See Also

prLibrary, prLoad, prSave

Examples

projectPath <- file.path(tempdir(), "test")
prInit(projectPath)

prScript("helloWorld")

# Edit the script so that it does something cool

prSource("helloWorld")

# Source a file in a subdirectory
prScript("myScript", subdir = "testdir")
prSource("myScript", subdir = "testdir")

# Or equivalently
prSource("testdir/myScript")


[Package tinyProject version 0.6.1 Index]