A set of predicates and assertions for checking the properties of files and connections. 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.
A set of predicates and assertions for checking the files of variables, such as length, names and attributes. Most of the documentation is on the assertive page. End-users will usually want to use assertive directly.
To install the stable version, type:
To install the development version, you first need the devtools package.
Then you can install the assertive.files package using
Functions for files:
is_dir checks if a path corresponds to a directory.
is_empty_file checks if a path corresponds to an empty file.
is_existing_file checks if a path corresponds to an existing file.
is_executable_file check a file's permissions. (Though they are based upon
base::file.access, which sometimes gives unexpected results under Windows.)
is_library checks if a path corresponds to a library that R knows about.
Functions for connections:
is_connection checks if a variable is a connection.
is_url_connection check for these specific connection types.
is_stdout check for these standard connections.
is_writable_connection check for these properties of connections.
Predicates that return a vector have two corresponding assertions. For example,
Predicates returning a single logical value have one corresponding assertion.
0.0-2 Added is_file_size_in_range. Can turn off warning about file.access under Windows. 0.0-1 Content extracted from assertive 0.3-0, and tidied.