axecute {logrx} | R Documentation |
Creation of a log and axecution of a file
Description
axecute()
creates a log, executes a file, and returns 0 if there are no
errors or 1 if there are any errors
Usage
axecute(
file,
log_name = NA,
log_path = NA,
include_rds = FALSE,
quit_on_error = TRUE,
to_report = c("messages", "output", "result"),
show_repo_url = FALSE,
...
)
Arguments
file |
String. Path to file to execute |
log_name |
String. Name of log file |
log_path |
String. Path to log file |
include_rds |
Boolean. Option to export log object as Rds file. Defaults to FALSE |
quit_on_error |
Boolean. Should the session quit with status 1 on error? Defaults to TRUE |
to_report |
String vector. Objects to optionally report, may include as many as necessary:
|
show_repo_url |
Boolean. Should the repository URLs be reported Defaults to FALSE |
... |
Not used |
Value
0 if there are no errors or 1 if there are any errors
Examples
dir <- tempdir()
text <- 'print("Hello, logrxperson!")'
fileConn <- file(file.path(dir, "hello.R"))
writeLines(text, fileConn)
close(fileConn)
axecute(file.path(dir, "hello.R"))
fileConn <- file(file.path(dir, "hello.Rmd"))
writeLines(text, fileConn)
close(fileConn)
axecute(file.path(dir, "hello.Rmd"))
[Package logrx version 0.3.1 Index]