Learn R Programming

tdata (version 0.3.0)

get.class.id: Get the Class Id of a Frequency

Description

Use this function to get the 'id' of a frequency class.

Usage

get.class.id(frequency)

Value

A character string that represents the class id of this frequency.

Arguments

frequency

The frequency, which must be an ldtf object returned from the f.? functions.

Details

You need this 'id' to convert the character back to the object. Some frequencies have a constant class id, such as 'm' for 'monthly' data. Some class 'ids' have parameters in them. Note that the format is explained in the f.? functions.

Examples

Run this code

freq <- f.x.times.a.day(f.daily(c(2023,5,16)),13, 12)
freq_class_id <- get.class.id(freq) # this will be 'da13|d'.

Run the code above in your browser using DataLab