FormatDate: Format date variables using 'recogniseDateTime'

Description Usage Arguments Value Author(s) Examples

View source: R/FormatDate.R

Description

Format date variable from character to R class “POSIXct” so that we can manipulate with date variables

Usage

1
FormatDate(dat, yy, mm)

Arguments

dat

A data.frame, has at least one key variable:

  • RESULT.DATE an object of classes have information calender date and times

yy

A numeric value specifies the year of the data set.

mm

A numeric value specifies the month of the data set.

Value

A data.table, has at least one key variable:

Author(s)

Ying Chen

Examples

1
2
3
4
5
# Load example data
data("gluDat")
head(gluDat)
gluDat2 <- FormatDate(dat = gluDat, yy = 2020, mm = 7)
head(gluDat2)

nyilin/QcDM documentation built on June 29, 2021, 1:14 a.m.