Learn R Programming

assertive.reflection (version 0.0-1)

assert_r_can_find_tools: Can R find tools?

Description

Checks to see if R can see command line tools.

Usage

assert_r_can_find_tools(severity = getOption("assertive.severity", "stop"))

assert_r_can_compile_code(severity = getOption("assertive.severity", "stop"))

assert_r_can_build_translations(severity = getOption("assertive.severity",
  "stop"))

r_can_find_tools(tools)

r_can_compile_code()

r_can_build_translations()

Arguments

severity
How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".
tools
A character vector of tools to look for.

Value

  • The is_* functions return TRUE if the input is within an interval. The assert_* functions return nothing but throw an error if the corresponding is_* function returns FALSE.

See Also

Sys.which

Examples

Run this code
r_can_find_tools(c("latex", "pdflatex"))
r_can_compile_code()
r_can_build_translations()
assertive.base::dont_stop(assert_r_can_find_tools(c("latex", "pdflatex")))
assertive.base::dont_stop(assert_r_can_compile_code())
assertive.base::dont_stop(r_can_build_translations())

Run the code above in your browser using DataLab