Seriesplot.fn: Function to plot series data

Seriesplot.fnR Documentation

Function to plot series data

Description

function to plot series data. including Respiration data and Peak-to-Peak intervals series.

Usage

Seriesplot.fn(
  x,
  y,
  xRange = NA,
  yRange = NA,
  points = TRUE,
  pch = 1,
  col.point = 1,
  cex.point = 1,
  line = TRUE,
  lty = 1,
  col.line = 1,
  lwd = 1,
  xlab = "x",
  ylab = "y",
  main = ""
)

Arguments

x

a vector for the x-axis coordinate of a sequence.

y

a vector for the y-axis coordinates of a sequence.

xRange

range for the x-axis.

yRange

range for the y-axis.

points

whether to draw the points of the sequence. If points = TRUE, a sequence of points will be plotted. otherwise, will not plot the points.

pch

points types.

col.point

color code or name of the points.

cex.point

cex of points

line

whether to draw a line of the sequence. If line = TRUE, a line of sequence will be plotted. otherwise, will not plot the line.

lty

line types.

col.line

color code or name of the line.

lwd

line width.

xlab

a title for the x axis.

ylab

a title for the y axis.

main

main title for the picture.

Value

No value return

References

Zhang T, Dong X, Chen C, Wang D, Zhang XD. RespirAnalyzer: an R package for continuous monitoring of respiratory signals.

Examples

data("TestData")
oldpar <- par(mfrow=c(1,2))
Seriesplot.fn(Data[1:10000,1],Data[1:10000,2],points=FALSE,xlab="Time(s)",ylab="Respiration")
Fs=50 ## sampling frequency is 50Hz
Peaks <- find.peaks(Data[,2],Fs,lowpass=TRUE,freq=1,MovingAv=FALSE,
                    W=FALSE,filter=TRUE,threshold=0.05)
PP_interval=diff(Peaks[,1])/Fs
Seriesplot.fn(1:length(PP_interval),PP_interval,points=FALSE,xlab="Count",ylab="Interval(s)")
par(oldpar)


RespirAnalyzer documentation built on July 9, 2023, 7 p.m.