to_date: Make a Date from year, month, day

Description Usage Arguments Value Note Examples

View source: R/Main_functions.R

Description

This function makes a Date from the supplied year, month, and day paramters. NA values for month and day are replaced by 1.

Usage

1
to_date(year, month, day)

Arguments

year

Numeric year

month

Numeric month

day

Numeric day

Value

A Date object

Note

This function is for internal use only.

Examples

1
2
3
4
5
6
## Not run: 
ProjectRGCapstone::to_date(2017, 4, 17)  # => 2017-04-17
ProjectRGCapstone::to_date(2017, 4, NA)  # => 2017-04-01
ProjectRGCapstone::to_date(2017, NA, NA) # => 2017-01-01

## End(Not run)

RG9303/ProjectRGCapstone documentation built on Sept. 23, 2020, 12:43 a.m.