getScriptName | R Documentation |
This function attempts to retrieve the name of the currently opened script in
the RStudio editor. If the script name cannot be obtained or if the rstudioapi
package is
not available, it returns the basename of the directory specified by OutDir
.
getScriptName()
A string containing the basename of the current script or the basename of OutDir
if the script name is unavailable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.