-
Notifications
You must be signed in to change notification settings - Fork 1
/
ReadMe.Rmd
77 lines (53 loc) · 2.82 KB
/
ReadMe.Rmd
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
---
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# WeibullR.plotly
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/WeibullR.plotly)](https://CRAN.R-project.org/package=WeibullR.plotly)
[![CRAN checks](https://badges.cranchecks.info/summary/WeibullR.plotly.svg)](https://cran.r-project.org/web/checks/check_results_WeibullR.plotly.html)
[![](http://cranlogs.r-pkg.org/badges/last-month/WeibullR.plotly)](https://cran.r-project.org/package=WeibullR.plotly)
[![](http://cranlogs.r-pkg.org/badges/grand-total/WeibullR.plotly)](https://cran.r-project.org/package=WeibullR.plotly)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![](https://img.shields.io/badge/doi-10.32614/CRAN.package.WeibullR.plotly-green.svg)](https://doi.org/10.32614/CRAN.package.WeibullR.plotly)
<!-- badges: end -->
Build interactive Weibull Probability Plots with WeibullR, an R package for Weibull analysis, and plotly, an interactive web-based graphing library.
# Getting Started
To install WeibullR.plotly in R:
```{r, eval=FALSE}
install.packages('WeibullR.plotly')
```
Or install the development version:
```{r, eval=FALSE}
devtools::install_github('paulgovan/weibullr.plotly')
```
# 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(WeibullR.plotly)
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
WeibullR.plotly 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 WeibullR.plotly project is released with a [Contributor Code of Conduct](https://github.com/paulgovan/WeibullR.plotly/blob/f919aeb72a1d4dd3a64e55221eb1ae214b3480f5/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.
# More Resources
For an interactive introduction to Life Data Analysis, check out
[WeibullR.learnr](https://paulgovan.github.io/WeibullR.learnr/)
To try WeibullR.plotly in a Shiny app, check out [WeibullR.shiny](https://paulgovan.github.io/WeibullR.shiny/)