-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathReadMe.Rmd
More file actions
81 lines (60 loc) · 2.6 KB
/
ReadMe.Rmd
File metadata and controls
81 lines (60 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
output: github_document
editor_options:
markdown:
wrap: 72
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# ReliaPlotR
<!-- badges: start -->
[](https://www.repostatus.org/#active)
[](https://CRAN.R-project.org/package=ReliaPlotR)
[](https://github.com/paulgovan/ReliaPlotR/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/paulgovan/ReliaPlotR)
[](https://cran.r-project.org/package=ReliaPlotR)
[](https://cran.r-project.org/package=ReliaPlotR)
<!-- badges: end -->
Build interactive Reliability Probability Plots with `plotly`, an interactive web-based
graphing library.
## Getting Started
To install `ReliaPlotR` in R:
```{r, eval=FALSE}
install.packages("ReliaPlotR")
```
Or install the development version:
```{r, eval=FALSE}
devtools::install_github("paulgovan/ReliaPlotR")
```
## Basic Examples
To build a probability plot, first fit a `wblr` object using the
`WeibullR` package and then use `plotly_wblr` to build the plot.
```{r message=FALSE, warning=FALSE}
library(WeibullR)
library(ReliaPlotR)
failures <- c(30, 49, 82, 90, 96)
obj <- wblr.conf(wblr.fit(wblr(failures)))
plotly_wblr(obj)
```
To build a contour plot, use the `plotly_contour` function. Note that
contour plots are only available where `method.fit='mle'` and
`method.conf='lrb'`.
```{r message=FALSE, warning=FALSE}
obj <- wblr.conf(wblr.fit(wblr(failures), method.fit = "mle"), method.conf = "lrb")
plotly_contour(obj)
```
## Customization
`ReliaPlotR` has several customization options.
```{r message=FALSE, warning=FALSE}
plotly_wblr(obj, main = "Weibull Probability Plot", xlab = "Years", ylab = "Failure Probability", confCol = "blue", signif = 4, grid = FALSE)
```
```{r message=FALSE, warning=FALSE}
plotly_contour(obj, main = "Weibull Contour Plot", col = "red", signif = 4, grid = FALSE)
```
## Code of Conduct
Please note that the ReliaPlotR project is released with a
[Contributor Code of
Conduct](https://github.com/paulgovan/ReliaPlotR/blob/f919aeb72a1d4dd3a64e55221eb1ae214b3480f5/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.