Description Usage Arguments See Also Examples
Source a R script in the "scripts" folder of the project.
1 |
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 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.