Description Usage Arguments Value See Also Examples
Create a "uts_vector"
from wide tabular data (see Wikipedia). For data in this format, values in the same row are measurements at the same time point, either across multiple entities (e.g. persons, countries) or of multiple attributes (e.g. several economic indicators, blood work results). Values in the same column are measurements of the same entity or attribute over time.
1 | uts_vector_wide(values, times, names = colnames(values))
|
values |
a matrix or data.frame. Each row is a vector of observations at a specific time point. |
times |
a |
names |
a character vector. The entity/attribute names of the columns of |
An object of class "uts_vector"
. The number of time series is equal to the number of columns of values
. The length of each time series is equal to the number of rows of values
.
uts_vector_long
, uts_matrix_long
, uts_matrix_wide
1 2 3 | values <- data.frame(apples=1:10, oranges=letters[1:10],
bananas=month.name[1:10], stringsAsFactors=FALSE)
uts_vector_wide(values, times=as.POSIXct("2015-01-01") + ddays(1:10))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.