assertive.reflection v0.0-5
Monthly downloads
Assertions for Checking the State of R
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. This is mainly for use by other package developers who
want to include run-time testing features in their own packages.
End-users will usually want to use assertive directly.
Readme
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.
Functions in assertive.reflection
Name | Description | |
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 | |
No Results! |
Last month downloads
Details
Type | Package |
Date | 2020-07-30 |
URL | https://bitbucket.org/richierocks/assertive.reflection |
BugReports | https://bitbucket.org/richierocks/assertive.reflection/issues |
License | GPL (>= 3) |
LazyLoad | yes |
LazyData | yes |
Acknowledgments | Development of this package was partially funded by
the Proteomics Core at Weill Cornell Medical College in Qatar
|
Collate | 'imports.R' 'assert-is-32-64-bit.R' 'assert-is-current.R' 'assert-is-decimal-point.R' 'assert-is-ide.R' 'assert-is-on-os-path.R' 'assert-is-os.R' 'assert-is-r-mode.R' 'assert-is-r-version.R' 'assert-r-has-capability.R' 'is-32-64-bit.R' 'is-current.R' 'is-decimal-point.R' 'is-ide.R' 'is-on-os-path.R' 'is-os.R' 'is-r-mode.R' 'is-r-version.R' 'locale.R' 'r-has-capability.R' |
RoxygenNote | 7.1.1 |
Repository | CRAN |
NeedsCompilation | no |
Packaged | 2020-07-30 21:23:39 UTC; richie |
Date/Publication | 2020-07-31 01:00:14 UTC |
imports | assertive.base (>= 0.0-7) , utils |
depends | R (>= 3.0.0) |
suggests | testthat |
Contributors |
Include our badge in your README
[](http://www.rdocumentation.org/packages/assertive.reflection)