head_t: Initial Subperiod

Description Usage Arguments Methods (by class) Note See Also Examples

View source: R/head_t_tail_t.R

Description

Return a subperiod time series with the initial part, where the length is specified in terms of the temporal length.

Usage

1
2
3
4
head_t(x, ...)

## S3 method for class 'uts'
head_t(x, width, ...)

Arguments

x

a time series object.

...

further arguments passed to or from methods.

width

a duration object, specifying the temporal width of the initial subperiod time series.

Methods (by class)

Note

For an evenly spaced time series, the methods head() and head_t() essentially work the same. For unevenly spaced time series, however, they are quite different. The subperiod window of the former is determined by the observation values, while for the latter it is determined by the observation times.

See Also

head, tail, tail_t, window for other methods that extract a subperiod time series.

Examples

1
2
head_t(ex_uts(), ddays(1))
head_t(ex_uts(), ddays(0))  # leaves only the first observation

andreas50/uts documentation built on April 8, 2021, 10:03 a.m.