R/stats.R
tst90.RdCompute TST90, the percentage of time during sleep with an oxygen saturation below 90.
tst90(spo2_signal, sRate, startTime, hypnogram)The SpO2 signal vector.
The SpO2 signal vector sample rate.
The SpO2 signal start time.
Events dataframe containing hypnogram.