Description Usage Arguments Details Value Author(s) See Also Examples
Takes in a data, and returns summary of date variables
1 |
data |
a data.frame or data.table |
dqdate
produces summary of all date variables in the data. The function
identifies all variables as date if they are of class 'Date' or 'IDate'.
Generally the dates are imported in R as character. They must be converted to an appropriate date format and then the function should be used.
The summary includes variable, non-missing values, missing values, minimum and maximum of the date variabes. Input data can be a 'data.frame' or 'data.table' but the output summary will be a 'data.frame' only.
a data.frame which contains the variable, non-missing values, missing values, minimum and maximum of all date variables
Akash Jain
dqcontinuous
, dqcategorical
, contents
1 2 3 4 5 6 7 8 9 | # A 'data.frame'
df <- data.frame(date = c('2012-11-21', '2015-1-4', '1996-4-30', '1979-9-23', '2005-5-13'),
temperature = c(26, 32, 35, 7, 14))
# Convert character date to date format
df[, 'date'] <- as.Date(df[, 'date'])
# Generate a data quality report of date variables
summaryDate <- dqdate(data = df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.