stepvec: Convert vector into step-like vector

Description Usage Arguments Details Examples

Description

Take a vector of values (with some set of indices) and create a step-like function by shifting indices.

Usage

1
stepvec(x, y)

Arguments

x, y

numeric vectors giving the coordinates of the points to be converted into a step-like function

Details

This will be useful for creating source-time-functions from realistic data, that are formatted appropriately for poel.

Examples

1
2
3
4
5
6
7
SV <- stepvec(seq_len(10), rnorm(10))
SV

## Not run: 
plot(y ~ x, SV, type='b')

## End(Not run)

abarbour/poel documentation built on June 22, 2019, 6:45 p.m.