axecute | R Documentation |
axecute()
creates a log, executes a file, and returns 0 if there are no
errors or 1 if there are any errors
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,
...
)
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 |
0 if there are no errors or 1 if there are any errors
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.