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,
extra_info = NA,
...
)
String. Path to file to execute
String. Name of log file
String. Path to log file
Boolean. Option to export log object as Rds file. Defaults to FALSE
Boolean. Should the session quit with status 1 on error? Defaults to TRUE
String vector. Objects to optionally report, may include as many as necessary:
messages: any messages generated by program execution
output: any output generated by program execution
result: any result generated by program execution
Boolean. Should the repository URLs be reported Defaults to FALSE
List. Objects to optionally add on to end of log in a special extra info section. List printed in YAML format. Optional
Not used
0 if there are no errors or 1 if there are any errors
dir <- tempdir()
text <- 'print("Hello, logrx-person!")'
fileConn <- file(file.path(dir, "hello.R"))
writeLines(text, fileConn)
close(fileConn)
axecute(file.path(dir, "hello.R"))
#> [1] "Hello, logrx-person!"
fileConn <- file(file.path(dir, "hello.Rmd"))
writeLines(text, fileConn)
close(fileConn)
axecute(file.path(dir, "hello.Rmd"))
#>
#>
#> processing file: hello.Rmd
#> 1/1
#> output file: hello.knit.md
#> /usr/lib/rstudio-server/bin/quarto/bin/tools/x86_64/pandoc +RTS -K512m -RTS hello.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output hello.html --lua-filter /cluster-data/user-homes/elizabethb/projects/prism-pkgdocs-build/installed-pkgs/logrx_0.4.0_lib/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /cluster-data/user-homes/elizabethb/projects/prism-pkgdocs-build/installed-pkgs/logrx_0.4.0_lib/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --variable bs3=TRUE --section-divs --template /cluster-data/user-homes/elizabethb/projects/prism-pkgdocs-build/installed-pkgs/logrx_0.4.0_lib/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmppGze5K/rmarkdown-str11c46269e7b7c5.html
#>
#> Output created: hello.html
#>
#>
#> processing file: /tmp/RtmppGze5K/hello.Rmd
#> 1/1
#> output file: /tmp/RtmppGze5K/file11c4625011972.R