Learn R Programming

assertive.reflection

A set of predicates and assertions for checking the state and capabilities of R, the operating system it is running on, and the IDE being used. Most of the documentation is on the assertive page. End-users will usually want to use assertive directly.

Installation

To install the stable version, type:

install.packages("assertive.reflection")

To install the development version, you first need the devtools package.

install.packages("devtools")

Then you can install the assertive.reflection package using

library(devtools)
install_bitbucket("richierocks/assertive.reflection")

Predicates

There are checks for

Whether you are running R (or an old S-PLUS): is_r.

Your operating system: is_windows, is_unix, is_linux, is_mac, is_solaris.

Your IDE: is_architect, is_rstudio, is_revo_r. Further, for RStudio, you have is_rstudio_desktop, is_rstudio_server.

R's capabilities: r_has_png_capability, r_has_tcltk_capability, etc., for each of the values returned by base::capabilities().

32/64 bit R: is_32_bit, is_64_bit.

How you are running R: is_batch_mode, is_interactive, is_r_slave.

What type of R you are running: is_r_release, is_r_patched, is_r_devel, is_r_alpha, is_r_beta, is_r_release_candidate.

Whether your software is up to date: is_r_current, is_package_current, is_rstudio_current.

What you use for a (numeric or monetary) decimal point: is_comma_for_decimal_point, is_period_for_decimal_point.

Whether a file or directory is on the OS search path: is_on_os_path.

Assertions

Predicates that return a vector have two corresponding assertions. For example, is_on_os_path has assert_all_are_on_os_path and assert_any_are_on_os_path.

Predicates returning a single logical value have one corresponding assertion. For example, is_r has assert_is_r.

Utilities

sys_get_locale and sys_set_locale are convenience wrappers to Sys.getlocale and Sys.setlocale respectively.

Copy Link

Version

Install

install.packages('assertive.reflection')

Monthly Downloads

160

Version

0.0-5

License

GPL (>= 3)

Maintainer

Last Published

July 31st, 2020

Functions in assertive.reflection (0.0-5)

assert_is_package_current

Is the installed version of a package current?
assert_is_batch_mode

How is R running?
assert_is_r_current

Is this version of R up to date?
is_rstudio_desktop

Is RStudio running in desktop or server mode?
assert_is_rstudio_current

Is RStudio the current version?
assert_all_are_on_os_path

Is the path on the OS path?
assert_is_comma_for_decimal_point

What does the current locale specify for the decimal point?
assert_is_architect

Are you running R?
assert_r_has_jpeg_capability

Does R have a capability?
assert_r_can_find_tools

Can R find tools?
assert_is_64_bit_os

What OS is running?
sys_get_locale

Get or set the system locale
rstudio_version_info

Get RStudio's version information