R/visualize.R

Defines functions visualize

Documented in visualize

#' Plots an object generated from one of the algorithms. In some cases multiple plots will be generated
#'
#' @param profile a `MatrixProfile` or `PMP` object.
#'
#' @export
#'
#' @references Website: <http://www.cs.ucr.edu/~eamonn/MatrixProfile.html>
#'
#' @family Main API
#'
#' @examples
#' result <- compute(mp_toy_data$data[, 1], 80)
#' visualize(result)
visualize <- function(profile) {
  if (!is.null(profile$profile)) {
    invisible(graphics::plot(profile$profile))
  } else {
    invisible(graphics::plot(profile))
  }
}

Try the tsmp package in your browser

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

tsmp documentation built on Aug. 21, 2022, 1:13 a.m.