| Type: | Package |
| Title: | Identify Script Name |
| Version: | 0.1.3 |
| Maintainer: | Tim Bergsma <bergsmat@gmail.com> |
| Description: | Identifies the name of the current script in a variety of contexts, e.g. interactively or when sourced. Attempts to support RStudio environment. Based on https://stackoverflow.com/a/32016824/2292993 and https://stackoverflow.com/a/35842176/2292993. |
| Encoding: | UTF-8 |
| License: | GPL-3 |
| Imports: | rstudioapi, knitr |
| RoxygenNote: | 7.3.2 |
| NeedsCompilation: | no |
| Packaged: | 2024-11-27 19:50:56 UTC; tim.bergsma |
| Author: | Tim Bergsma [aut, cre] |
| Repository: | CRAN |
| Date/Publication: | 2024-11-27 20:20:02 UTC |
Identify Script Name
Description
Identifies script name in a variety of contexts, e.g. interactively or when script is sourced. Attempts to support RStudio environment.
Usage
script()
Value
character: path to current file, or empty string if indeterminate
Examples
script()
Identify Script base Name
Description
Identifies script base name using script.
if ext is supplied (and script() is not empty string),
the last dot (and anything that follows it) is removed if present;
ext is appended.
Usage
scriptbase(ext = NULL)
Arguments
ext |
replacement extension |
Value
character: current filename, or empty string if indeterminate
Examples
scriptbase('.csv')