Description Usage Arguments Details See Also Examples
prScript
creates and opens a new script for edition. If the script
already exists, it opens it in the Rstudio editor.
1 |
name |
(optional) name of the script to create and/or open. This parameter can also include the subfolder where to save the script (see examples). |
template |
(Optional) One of "analysis", "data" or "function". Template to use for the
creation of a script. |
subdir |
subdirectory where the scripts needs to be created or opened. The
subdirectory can also be directly specified in the parameter |
instructions |
Should the created script include some instructions? |
If the parameter name
is missing, then a list of existing scripts is
displayed. The user is then invited to choose one by typing the number or
name of the script he wants to open.
prSource
, prMoveScript
, prRenameScript
,
prDeleteScript
1 2 3 4 5 6 7 8 9 10 11 12 13 | projectPath <- file.path(tempdir(), "test")
prInit(projectPath)
prScript("test")
list.files(projectPath, recursive = TRUE, include.dirs = TRUE)
prScript("myFunction", template = "function")
# Create script in a subfolder
prScript("test", subdir = "testdir")
# Or equivalently
prScript("testdir/test")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.