Skip to contents

Convert to `ts` object using a reference

Usage

tsfy(obj, ref, sampling.freq = NULL, na.rm = T)

Arguments

obj

A vector, list, or data frame.

ref

A `ts` object, time vector, or list specifying reference time.

sampling.freq

Optional frequency if `ref` is numeric.

na.rm

Logical. If TRUE, remove NA values (default: TRUE).

Value

A `ts` object or list of `ts` objects.