Learn R Programming

ReliaGrowR (version 0.3.2)

plot.rga: Plot Method for RGA Objects

Description

This function generates plots for objects of class rga.

Usage

# S3 method for rga
plot(
  x,
  conf_bounds = TRUE,
  legend = TRUE,
  log = FALSE,
  legend_pos = "bottomright",
  ...
)

Value

Invisibly returns NULL.

Arguments

x

An object of class rga, which contains the results from the RGA model.

conf_bounds

Logical; include confidence bounds (default: TRUE).

legend

Logical; show the legend (default: TRUE).

log

Logical; use a log-log scale (default: FALSE).

legend_pos

Position of the legend (default: "bottomright").

...

Additional arguments passed to plot().

See Also

Other Reliability Growth Analysis: print.rga(), rga()

Examples

Run this code
times <- c(100, 200, 300, 400, 500)
failures <- c(1, 2, 1, 3, 2)
result <- rga(times, failures)
plot(result,
  main = "Reliability Growth Analysis",
  xlab = "Cumulative Time", ylab = "Cumulative Failures"
)

Run the code above in your browser using DataLab