create_xts: Create an XTS Object from Resampled Signals
Description
This function takes multiple signals and their corresponding sample rates,
resamples the signals to the highest sample rate among them, and creates
an xts (eXtensible Time Series) object with the resampled signals aligned
according to a provided start time.
Usage
create_xts(signals, sample_rates, start_time)
Value
An xts object containing the resampled signals, with each column
representing one of the original signals, resampled to the highest
sample rate among them. The xts object's index starts from
`start_time` and increments at a rate of 1 divided by the maximum
sample rate.
Arguments
signals
A list of numeric vectors representing the signals.
Each signal in the list should correspond to one sample rate
in the `sample_rates` argument.
sample_rates
A numeric vector containing the sample rates for each
signal in `signals`. The length of `sample_rates` must
match the length of `signals`.
start_time
The start time for the xts object. This can be a character
string or an object that can be converted to POSIXct. The
time is assumed to be in UTC.