View source: R/execute_access.R
| execute.access | R Documentation |
Validates whether a file or command can be executed. Supports both local paths and executables available in system PATH.
execute.access(path)
path |
Character string. Executable name or full path. |
A list of class execute_access_result containing:
path - Resolved executable path
exists - TRUE/FALSE
executable - TRUE/FALSE
in_path - TRUE/FALSE
status - Overall status message
# Check if Rscript is available (available on all R machines)
result <- execute.access("Rscript")
print(result)
# Check a full path to an executable
result <- execute.access(file.path(R.home("bin"), "Rscript"))
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.