Implementation in Julia

TimeSeries is a registered package. So like other packages, we can add it to your Julia packages:


The TimeArray time series type

immutable TimeArray{T, N, D<:TimeType, A<:AbstractArray} <: AbstractTimeSeries timestamp::Vector{D} values::A colnames::Vector{UTF8String} meta::Any function TimeArray(timestamp::Vector{D}, values::AbstractArray{T,N}, colnames::Vector{UTF8String}, meta::Any) nrow, ncol = size(values, 1), size(values, 2) nrow != size(timestamp, 1) ? error("values must match length of timestamp"): ncol != size(colnames,1) ? error("column names must match width of array"): timestamp != unique(timestamp) ? error("there are duplicate dates"): ~(flipdim(timestamp, 1) == sort(timestamp) ...

Get Julia for Data Science now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.