Convert a time series object to a timed data matrix

Share:

Description

This function converts a time series object to a timed data matrix, similar to that produced by simTimes. The main purpose is for passing data to the function pfMLLik, which expects data encoded in this format.

Usage

1
as.timedData(timeseries)

Arguments

timeseries

An R timeseries object, such as produced by the functions ts or simTs.

Value

An R matrix object with row names corresponding to observation times, similar to that produced by simTimes.

See Also

simTs, ts, simTimes, pfMLLik

Examples

1
2
3
4
truth=simTs(c(x1=50,x2=100),0,20,2,stepLVc)
simData=truth+rnorm(prod(dim(truth)),0,5)
timedData=as.timedData(simData)
print(timedData)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.