validate: Check that strings can be coerced to others

validateDateR Documentation

Check that strings can be coerced to others

Description

Tests whether a string can be interpreted as given type

Usage

validateDate(inputValue, expectedFormat = "%Y-%m-%d",
  secondaryFormat = "%m/%d/%Y", errorEnv = NULL)

validateCharacter(inputValue, errorEnv = NULL)

validateNumeric(inputValue, errorEnv = NULL)

Arguments

inputValue

value that should able to become the type, usually a string

expectedFormat

a format.POSIXct that dates should be formatted as

secondaryFormat

a format.POSIXct that will not throw warnings, and is tested second

errorEnv

environment where errorList is stored

Details

NA will be allowed through, use other functions to check for NA

Value

validateDate a string date in the format expectedFormat

validateCharacter a string

validateNumeric a numeric


mcneilco/racas documentation built on April 19, 2024, 1:12 p.m.