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.

# S3 method for 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

Examples

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