API for zoo
Full namespace name: incanter.zoo
This is a port of Zoo from R in order to create the basis
of a library for time series data.
This library is built on Parallel Colt
an extension of the Colt numerics library
Public Variables and Functions
Usage: ($$ ind ts)
($$ ind cols ts)
($$ ind-1 ind-2 cols ts)
This is the equivalent of :: in xts. That is, it slices out
the timeseries between ind-1 and ind-2. These are any values
that can be coerced into clj-time values.
Usage: (aligned? & zs)
Is the :index column identical for all zs.
Usage: (coredata x)
Return the :rows of a dataset, with :index dissoc'd.
Intended to be used internally time series function to get at data.
Usage: (lag z)
(lag z n)
Return the timeseries lagged by n units or 1 if not specified.
No time calculations are made in the index column. The output
timeseries is of the same length as the input.
Usage: (roll-apply f n coll)
A generic function for applying a function to rolling window of a collection.
f -- function to be applied
n -- size of rolling window
coll -- collection of data
Usage: (roll-max n coll)
Returns the rolling max of the previous n elements.
Usage: (roll-median n coll)
Returns the rolling median of the previous n elements.
Usage: (roll-min n coll)
Returns the rolling min of the previous n elements.
Usage: (within-zoo? t z)
Is t between the first and last indices.
Usage: (zoo x)
(zoo x index-col)
Return the given dataset as a zoo value which is simply a dataset
that contains an column of clj-time values specified by index-col,
default :index. That column must contain values that can be coerced
into Jodas using the TimeCoercible Protocol.
Usage: (zoo-apply f n zoo column & args)
Behave as for roll-apply but accept a zoo and a single column
upon which to roll-apply f. Returns a zoo of the same length
as input zoo with pre-pended nils
Usage: (zoo-row-map f & zs)
Accept a number of aligned zoo object and pass them row-wise
into f, return a zoo. f must accept and return maps. The :index
column is stripped out before f is applied, and then replaced
afterwards with the :index of the first.
Usage: (zoo-row-map- f & zs)
Accept a number of aligned zoo object and pass them row-wise into f,
return a seq of maps of the output of the output.
f must accept and return maps. The :index column is stripped out before
f is applied, and then replaced afterwards.
Usage: (zoo-row-map-occupied f & s)
zoo-row-map- and remove the empties. This returns a seq of maps