Learn R Programming

WeibullR.plotly (version 0.3.2)

plotly_rga: Interactive Reliability Growth Plot.

Description

The function creates an interactive reliability growth plot for an `rga` object. The plot includes cumulative failures over time, the model fit, and optional confidence bounds. Vertical lines indicate change points if breakpoints are specified in the rga object.

Usage

plotly_rga(
  rga_obj,
  showConf = TRUE,
  showGrid = TRUE,
  main = "Reliability Growth Plot",
  xlab = "Cumulative Time",
  ylab = "Cumulative Failures",
  pointCol = "black",
  fitCol = "black",
  confCol = "black",
  gridCol = "lightgray",
  breakCol = "black"
)

Value

The function returns no value. It generates an interactive plotly plot.

Arguments

rga_obj

An object of class 'rga'. This object is created using the `rga()` function from the `ReliaGrowR` package.

showConf

Show the confidence bounds (TRUE) or not (FALSE).

showGrid

Show grid (TRUE) or hide grid (FALSE).

main

Main title.

xlab

X-axis label.

ylab

Y-axis label.

pointCol

Color of the point values.

fitCol

Color of the model fit.

confCol

Color of the confidence bounds.

gridCol

Color of the grid.

breakCol

Color of the breakpoints.

Examples

Run this code
library(ReliaGrowR)
times<-c(100, 200, 300, 400, 500)
failures<-c(1, 2, 1, 3, 2)
rga<-rga(times, failures)
plotly_rga(rga)

times <- c(100, 200, 300, 400, 500, 600, 700, 800, 900, 1000)
failures <- c(1, 2, 1, 1, 1, 2, 3, 1, 2, 4)
breakpoints <- 400
rga2 <- rga(times, failures, model_type = "Piecewise NHPP", breaks = breakpoints)
plotly_rga(rga2, fitCol = "blue", confCol = "blue", breakCol = "red")

Run the code above in your browser using DataLab