View source: R/translate_to_iso8601_duration.R
translate_to_iso8601_duration | R Documentation |
This function translates a given frequency string such as 'minute', 'hour', 'daily', 'weekly', etc. into the corresponding ISO 8601 duration format (e.g., 'PT1M', 'P1D', 'P1W'). It defaults to 'P1D' (daily) if the input is not recognized.
translate_to_iso8601_duration(frequency = "daily")
frequency |
A character string representing the time frequency. Accepted values include 'minute', 'hour', 'daily', 'weekly', 'monthly', 'quarterly', 'yearly'. Default is 'daily'. |
This function specially helps transitioning legacy EikonGetTimeseries Code to get rd_GetHistoricalPricing() when using this function one do not need to worry about the correct interval
A character string representing the ISO 8601 duration equivalent of the input frequency.
translate_to_iso8601_duration('minute') # Returns "PT1M"
translate_to_iso8601_duration('hour') # Returns "PT1H"
translate_to_iso8601_duration('weekly') # Returns "P1W"
translate_to_iso8601_duration('unknown') # Returns "P1D" (default)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.