Type: Package
Title: Interactive Weibull Probability Plots
Version: 0.3.1
Description: Build interactive Weibull Probability Plots with 'WeibullR' by David Silkworth and Jurgen Symynck (2022) https://CRAN.R-project.org/package=WeibullR, an R package for Weibull analysis, and 'plotly' by Carson Sievert (2020) https://plotly-r.com, an interactive web-based graphing library.
URL: https://paulgovan.github.io/WeibullR.plotly/, https://github.com/paulgovan/WeibullR.plotly
BugReports: https://github.com/paulgovan/WeibullR.plotly/issues
License: Apache License version 1.1 | Apache License version 2.0 [expanded from: Apache License]
Imports: plotly, ReliaGrowR, WeibullR
Suggests: knitr, rmarkdown, spelling, testthat (≥ 3.0.0), WeibullR.learnr, WeibullR.shiny
Encoding: UTF-8
RoxygenNote: 7.3.2
Config/testthat/edition: 3
Language: en-US
NeedsCompilation: no
Packaged: 2025-07-16 19:01:55 UTC; paulgovan
Author: Paul Govan ORCID iD [aut, cre, cph]
Maintainer: Paul Govan <paul.govan2@gmail.com>
Repository: CRAN
Date/Publication: 2025-07-16 19:30:09 UTC

Interactive Contour Plot

Description

This function creates an interactive contour plot for one or more 'wblr' objects, each assumed to have confidence contours generated via ‘method.conf = ’lrb''. The function overlays all contours in a single plot and displays their respective MLE point estimates.

Usage

plotly_contour(
  wblr_obj,
  main = "Contour Plot",
  xlab = "Eta",
  ylab = "Beta",
  showGrid = TRUE,
  cols = NULL,
  gridCol = "lightgray",
  signif = 3
)

Arguments

wblr_obj

A single 'wblr' object or a list of 'wblr' objects.

main

Main title for the plot.

xlab

X-axis label (typically Eta or Sigmalog).

ylab

Y-axis label (typically Beta or Mulog).

showGrid

Logical; whether to show grid lines (default TRUE).

cols

Optional vector of colors for each contour/estimate pair. If not provided, colors are chosen from a default palette.

gridCol

Color of the grid lines (default 'lightgray').

signif

Number of significant digits to display for estimates and contour coordinates.

Value

A 'plotly' object representing the interactive contour plot.

Examples

library(WeibullR)
library(WeibullR.plotly)

failures1 <- c(30, 49, 82, 90, 96)
failures2 <- c(20, 40, 60, 80, 100)
obj1 <- wblr.conf(wblr.fit(wblr(failures1), method.fit = 'mle'), method.conf = 'lrb')
obj2 <- wblr.conf(wblr.fit(wblr(failures2), method.fit = 'mle'), method.conf = 'lrb')
plotly_contour(list(obj1, obj2), main = "Overlayed Contours")


Interactive Duane Plot.

Description

This function creates an interactive Duane plot for a duane object.

Usage

plotly_duane(
  duane_obj,
  showGrid = TRUE,
  main = "Duane Plot",
  xlab = "Cumulative Time",
  ylab = "Cumulative MTBF",
  pointCol = "black",
  fitCol = "black",
  gridCol = "lightgray"
)

Arguments

duane_obj

An object of class 'duane'.

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.

gridCol

Color of the grid.

Value

The function returns no value.

Examples

library(ReliaGrowR)
times<-c(100, 200, 300, 400, 500)
failures<-c(1, 2, 1, 3, 2)
fit<-duane_plot(times, failures)
plotly_duane(fit)

Interactive Reliability Growth Plot.

Description

This function creates an interactive reliability growth plot for an 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"
)

Arguments

rga_obj

An object of class 'rga'.

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.

Value

The function returns no value.

Examples

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

Interactive Probability Plot.

Description

This function creates an interactive probability plot for a wblr object.

Usage

plotly_wblr(
  wblr_obj,
  susp = NULL,
  showConf = TRUE,
  showSusp = TRUE,
  showRes = TRUE,
  showGrid = TRUE,
  main = "Probability Plot",
  xlab = "Time to Failure",
  ylab = "Probability",
  probCol = "black",
  fitCol = "black",
  confCol = "black",
  intCol = "black",
  gridCol = "lightgray",
  signif = 3
)

Arguments

wblr_obj

An object of class 'wblr'.

susp

An optional numeric vector of suspension data.

showConf

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

showSusp

Show the suspensions plot (TRUE) or not (FALSE).

showRes

Show the results table (TRUE) or not (FALSE).

showGrid

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

main

Main title.

xlab

X-axis label.

ylab

Y-axis label.

probCol

Color of the probability values.

fitCol

Color of the model fit.

confCol

Color of the confidence bounds.

intCol

Color of the intervals for interval censored models.

gridCol

Color of the grid.

signif

Significant digits of results

Value

The function returns no value.

Examples

library(WeibullR)
library(WeibullR.plotly)
failures<-c(30, 49, 82, 90, 96)
obj<-wblr.conf(wblr.fit(wblr(failures)))
plotly_wblr(obj)