checkDate: Validate the date argument

Description Usage Arguments Value Examples

View source: R/dateToPeriod.R

Description

Internal function to validate (or convert) the provided date field

Usage

1
checkDate(x_date, name)

Arguments

x_date

Date string or vector

name

Name of argument to return in error/warning message

Value

Adjusted date field

Examples

1
2
3
4
5
6
 # Load Data
  data(ex_sales)

 # Check date
  date_checked <- checkDate(x_date = ex_sales$sale_date,
                            name = 'sale date')

hpiR documentation built on April 1, 2020, 5:09 p.m.