Learn R Programming

assertive.reflection (version 0.0-5)

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(
  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") )

assert_r_can_find_java( java_type = c("same_as_r", "any", "64bit", "32bit"), severity = getOption("assertive.severity", "stop") )

r_can_find_tools(tools)

r_can_compile_code()

r_can_build_translations()

r_can_find_java(java_type = c("same_as_r", "any", "64bit", "32bit"))

Arguments

tools

A character vector of tools to look for.

severity

How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".

java_type

A string denoting the type of Java to look for (either 32 or 64 bit).

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
# NOT RUN {
r_can_find_tools(c("latex", "pdflatex"))
r_can_compile_code()
r_can_build_translations()
r_can_find_java()
assertive.base::dont_stop({
  assert_r_can_find_tools(c("latex", "pdflatex"))
  assert_r_can_compile_code()
  assert_r_can_build_translations()
  assert_r_can_find_java("64bit")
})
# }

Run the code above in your browser using DataLab