Individualplot.fn {RespirAnalyzer}R Documentation

Function to plot multiscale entropy or MFDFA results by individual.

Description

function to plot multiscale entropy or MFDFA results by individual.

Usage

Individualplot.fn(
  x,
  y,
  Name = NA,
  xRange = NA,
  yRange = NA,
  col = NA,
  pch = NA,
  Position = "topright",
  cex.legend = 0.75,
  xlab = "",
  ylab = "",
  main = ""
)

Arguments

x

a vector for x-axis coordinate.

y

Matrix for response values.

Name

vector of names for each line.

xRange

range for the x-axis.

yRange

range for the y-axis.

col

vector for the colors to indicate groups.

pch

vector for points types to indicate groups.

Position

position for the legend.

cex.legend

cex for legend.

xlab

a title for x axis.

ylab

a title for y axis.

main

main title for the picture.

Value

No value returned

References

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

Examples

data("HqData")
PP_Hq <- HqData
filenames <- row.names(PP_Hq)
q=-10:10
ClassNames <- c(substr(filenames[1:19], start = 1, stop = 3),
                substr(filenames[20:38], start = 1, stop = 5))
Class <- unique(ClassNames)
col_vec <- rep(NA, nrow(PP_Hq) )
pch_vec <- rep(16, nrow(PP_Hq) )
for( i in 1:length(Class) ) { col_vec[ ClassNames == Class[i] ] <- i }
Individualplot.fn(q,PP_Hq,Name=Class,col=col_vec,pch=pch_vec, xlab="q",ylab="Hurst exponent")
legend("topright", legend=paste0(Class, "(N=", table( ClassNames ), ")"),
      col=1:4, cex=1, lty=1, pch=16)


[Package RespirAnalyzer version 1.0.2 Index]