Common String Format Validation

Validates common string formats including financial identifiers (ISIN, CUSIP, SEDOL, FIGI, IBAN, LEI), publication identifiers (ISBN, ISSN, DOI, ORCID), and general formats (email, UUID, URL, semver), with check digit verification where applicable.


checkstring

Lifecycle:experimental R-CMD-check CRANstatus R-universeversion

The goal of checkstring is to provide string format validation functions for R, inspired by Zod’s string validators. It extends the checkmate family of argument checks with common string format validations such as email addresses, UUIDs, URLs, IP addresses, and financial and academic identifiers like ISIN, CUSIP, IBAN, ISBN, and ORCID, including check digit verification.

Installation

You can install the released version of checkstring from CRAN with:

install.packages("checkstring")

And the development version from GitHub with:

# install.packages("pak")
pak::pak("m-muecke/checkstring")

Usage

library(checkstring)

is_email("[email protected]")
#> [1] TRUE
is_uuid("550e8400-e29b-41d4-a716-446655440000")
#> [1] TRUE
is_ipv4("192.168.1.1")
#> [1] TRUE
is_hex("deadbeef")
#> [1] TRUE
is_url("https://example.com")
#> [1] TRUE
is_base64("SGVsbG8gV29ybGQ=")
#> [1] TRUE
is_isin("US0378331005")
#> [1] TRUE
is_iban("GB29NWBK60161331926819")
#> [1] TRUE

Related work

  • checkmate: Fast and versatile argument checks for R
  • figir: Check validity of FIGI, CUSIP, ISIN, SEDOL
  • libbib: Validate and normalize ISBN, ISSN, LCCN

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("checkstring")

0.2.1 by Maximilian Mücke, 6 days ago


https://m-muecke.github.io/checkstring/, https://github.com/m-muecke/checkstring


Report a bug at https://github.com/m-muecke/checkstring/issues


Browse source code at https://github.com/cran/checkstring


Authors: Maximilian Mücke [aut, cre] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests curl, testthat


See at CRAN