Frames-0.1.1.1: Data frames For working with tabular data files

Safe HaskellNone
LanguageHaskell2010

Frames.Frame

Description

A Frame is a finite Int-indexed collection of rows.

Synopsis

Documentation

data Frame r Source

A Frame is a finite collection of rows indexed by Int.

Constructors

Frame 

Fields

frameLength :: !Int
 
frameRow :: Int -> r
 

Instances

Monad Frame 
Functor Frame 
Applicative Frame 
Foldable Frame 
Monoid (Frame r)

The Monoid instance for Frame provides a mechanism for vertical concatenation of Frames. That is, f1 <> f2 will return a new Frame with the rows of f1 followed by the rows of f2.

type FrameRec rs = Frame (Record rs) Source

A Frame whose rows are Record values.

boxedFrame :: Foldable f => f r -> Frame r Source

Build a Frame from any Foldable. This simply uses a boxed Vector to hold each row. If you have a collection of Records, consider using toFrame.

zipFrames :: FrameRec rs -> FrameRec rs' -> FrameRec (rs ++ rs') Source

Horizontal Frame concatenation. That is, zipFrames f1 f2 will return a Frame with as many rows as the smaller of f1 and f2 whose rows are the result of appending the columns of f2 to those of f1.