Learn R Programming

assertive.data

A set of predicates and assertions for checking the properties of (country independent) complex data types. 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.data")

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

install.packages("devtools")

Then you can install the assertive.data package using

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

Predicates

is_cas_number checks character vectors for Chemical Abstracts Service registry numbers.

is_credit_card_number checks character vectors for credit card numbers.

is_email_address checks character vectors

is_hex_color (and its synonym, is_hex_colour) check character vectors for hexadecimal colors.

is_honorific checks character vectors for honorifcs, like Mr and Mrs.

is_ip_address checks character vectors for Internet Protocol addresses.

is_isbn_code checks character vectors for International Standard Book Numbers. is_isbn10_code and is_isbn13_code check only for the 10/13 digit ISBNs.

Assertions

Predicates all return a vector and have two corresponding assertions. For example, is_cas_number has assert_all_are_cas_numbers and assert_any_are_cas_numbers.

Copy Link

Version

Install

install.packages('assertive.data')

Monthly Downloads

79

Version

0.0-3

License

GPL (>= 3)

Maintainer

Last Published

November 21st, 2018

Functions in assertive.data (0.0-3)

assert_all_are_isbn_codes

Does the character vector contain ISBN book codes?
assert_all_are_email_addresses

Does the character vector contain email addresses?
assert_all_are_hex_colors

Does the character vector contain hex colors?
assert_all_are_cas_numbers

Does the character vector contain CAS registry numbers?
assert_all_are_credit_card_numbers

Does the character vector contain credit card numbers?
assert_all_are_honorifics

Is the string an honorific?
assert_all_are_ip_addresses

Does the character vector contain IP addresses?