R/plot.turnpoints.R

plot.turnpoints <- function(x, level = 0.05, lhorz = TRUE, lcol = 2, llty = 2,
  type = "l", xlab = "data number",
  ylab = paste("I (bits), level = ", level * 100, "%", sep = ""),
  main = paste("Information (turning points) for:", x$data), ...) {

  # The next function actually draws the graph
  turnpoints.graph <- function(X, Level, Lhorz, Lcol, Llty, Type, Xlab, Ylab,
    Main, Sub, ...) {
    plot(X$tppos, X$info, type = Type, xlab = Xlab, ylab = Ylab, main = Main, ...)
    abline(h = -log(Level, base = 2), lty = Llty, col = Lcol)
  }
  if (is.null(x$info))
    stop("Unable to plot turning points when they were calculated with cal.proba= FALSE")
  invisible(turnpoints.graph(x, level[1], lhorz, lcol, llty, type, xlab, ylab,
    main, ...))
}

Try the pastecs package in your browser

Any scripts or data that you put into this service are public.

pastecs documentation built on May 2, 2019, 3:36 p.m.