SparseSignal: SparseSignal

Description Usage Arguments Value Author(s) Examples

Description

Make a SparseSignal, which is a piecewise constant function defined on 1, ..., L.

Usage

1
SparseSignal(first, after, value)

Arguments

first

Integer vector: first position of each segment.

after

Integer vector: first position after each segment.

value

Numeric vector: segment values.

Value

data.frame with columns first, after, value. 1 row per segment, and there are no rows for segments with value 0.

Author(s)

Toby Dylan Hocking

Examples

1
2
3
4
5
## SparseSignals do not have 0-valued segments.
ss <- SparseSignal(c(10, 12, 15, 1000),
                   c(11, 13, 17, 1001),
                   c( 1, -2,  4,    0))
print(ss)

tdhock/SparseSignals documentation built on May 31, 2019, 7:33 a.m.