make_ticker {SUNGEO} | R Documentation |
Make date ticker
Description
Function to create a table of consecutive dates, in SUNGEO-compliant format.
Usage
make_ticker(
date_min = 19000101,
date_max = as.integer(gsub("-", "", as.Date(Sys.Date())))
)
Arguments
date_min |
Start date, in YYYYMMDD format. Default is |
date_max |
End date, in YYYYMMDD format. Default is today. Integer. |
Value
data.table
object, with seven columns:
-
DATE
. Date in YYYYMMDD format. Integer. -
DATE_ALT
. Date inDate
(YYYY-MM-DD) format. Date. -
TID
. Date ID, in consecutive integer format. Integer. -
YRWK
. Week in YYYYWW format. Integer. -
WID
. Weed ID, in consecutive integer format. Integer. -
YRMO
. Month in YYYYMM format. Integer. -
MID
. Month ID, in consecutive integer format. Integer. -
YEAR
. Year in YYYY format. Integer.
Examples
# All dates from January 1, 1900 to today
## Not run:
out_1 <- make_ticker()
out_1
## End(Not run)
# All dates from January 1, 1200 to today
## Not run:
out_2 <- make_ticker(date_min=12000101)
out_2
## End(Not run)
# All dates from January 1, 1500 to December 31, 1899
## Not run:
out_3 <- make_ticker(date_min=15000101, date_max=18991231)
out_3
## End(Not run)
[Package SUNGEO version 1.3.0 Index]