test_datecol: Test for proper formatting in a date column

Description Usage Arguments Value

Description

Test for proper formatting in a date column

Usage

1
test_datecol(dat, index, form = ymd)

Arguments

dat

data frame to test

index

index of column containing dates

form

a lubridate function giving the format the dates should be in

Value

returns FALSE if parsing using the function specified in form fails. If parsing succeeds, the minimum and maximum years in the date column are printed, so that mis-formatted dates (that still pass parse tests) can be detected.


muschellij2/testdat documentation built on May 23, 2019, 9:56 a.m.