fg_dates_of_interest: Maintain Aethestics and Dates of Interest

fg_dates_of_interestR Documentation

Maintain Aethestics and Dates of Interest

Description

fg_get_dates_of_interest() gets a set of time events for use in fg time series graphs fg_update_dates_of_interest() updates a set of time events for future use in time series graphs

Usage

fg_get_dates_of_interest(
  search_categories = "",
  use_default = TRUE,
  startdt = NULL,
  totoday = FALSE
)

fg_update_dates_of_interest(indta, replace = FALSE)

Arguments

search_categories

Grep string of categories to return.

use_default

(Default TRUE) use dedault dates if none else found.

startdt

Minimum date for events to be returned.

totoday

(Default: FALSE) Ends last date set returned (if applicable) with totoday if a date, Sys.Date()

indta

data.table with columns as shown in details.

replace

(Default: FALSE) If TRUE, replaces existing dates of interest with new set provided, otherwise replaces/inserts new rows only.

Details

Retrieves default dates of interest given a grepstring of categories. There are a default set of categories provided which may not be up to date. New data passed into fg_update_dates_of_interest() or fg_update_aes() persists across future loads of the package. Any duplicates in the new file will be taken out.

New doi data.frames must have at least three columns:

Column Meaning
category Grouping name (string) for a given set of dates of interest
eventid Character string to be displayed at each event.
DT_ENTRY Start Date of event
END_DT_ENTRY Optional end of period to define regimes or ranges of events.

Value

data.table::data.table() of date or date ranges, or 'NULL“if new dates are added.

See Also

fgts_dygraph()

Examples

require(utils)
require(data.table)
tail(fg_get_dates_of_interest("fedmoves"),2)
# To add (for example) a new FOMC cut of 50bps on 6/16/2026:
newdoi <-data.table(category="fedmoves",eventid="F:-50",
            DT_ENTRY=as.Date("6/16/2026",format="%m/%d/%Y"))
fg_update_dates_of_interest(newdoi)
# Since this is in the future, we have to make the future now.
fg_get_dates_of_interest("fedmoves",totoday=as.Date("2026-12-31"))
fg_reset_to_default_state("doi")
fg_reset_to_default_state("all")


FinanceGraphs documentation built on June 22, 2026, 5:08 p.m.