Learn R Programming

speaq (version 2.7.0)

doShift: Segment shift

Description

Move a spectral segment of a sample shiftStep points to right or left

Usage

doShift(specSeg, shiftStep)

Arguments

specSeg

The segment which needs to be shifted

shiftStep

The shift step for moving. If it is a negative (positive) value, the segment is moved to left (right).

Value

The new segment after shifting.

See Also

hClustAlign, findShiftStepFFT

Examples

Run this code
# NOT RUN {
res=makeSimulatedData();
X=res$data;
groupLabel=res$label;
maxShift=50;
refSpec=X[1,];
tarSpec=X[2,];
adj=findShiftStepFFT(refSpec, tarSpec,maxShift=maxShift);
newTarSpec=doShift(tarSpec,adj$stepAdj);

# }

Run the code above in your browser using DataLab