scale.ts: Rescale the y values of a (multi-)time series (ts) object

Description Usage Arguments Value See Also Examples

Description

Linearly rescale y values to map range[1] to 0 and range[2] to 1. Values outside this range will be <0 and >1 respectively.

Usage

1
2
## S3 method for class 'ts'
scale(x, center = min(x), scale = diff(range(x)))

Arguments

x

A ts ormts object

center

Value to map to 0 (defaults to the minimum value of yrange)

scale

Defaults to ymax-ymin

Value

return value Single time series (ts)

See Also

ts

Examples

1
2
3
w<-read.pxp(system.file("igor","WedJul407c2_001.pxp",package="IgorR"))
wts<-WaveToTimeSeries(w[c('RecordA0',"RecordA1")])
ws<-scale(wts,center=-200,scale=400)

jefferis/gphys documentation built on June 5, 2019, 9:45 p.m.