Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
^www$
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# RStudio project file
*.Rproj

# Windows image file caches
Thumbs.db
ehthumbs.db
Expand All @@ -6,6 +9,9 @@ ehthumbs.db
src-i386
src-x64

# Folders holding MacOS compiled objects
/src/*

# Folder config file
Desktop.ini

Expand Down Expand Up @@ -49,3 +55,4 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk
.Rproj.user
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ LazyLoad: yes
Depends: plyr
Imports: Rcpp (>= 0.11.1)
LinkingTo: Rcpp, RcppArmadillo

RoxygenNote: 6.0.1
7 changes: 7 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#' Data set for example
#'
#' A dataset containing values for the README example. Need to have a better description
#' Look at example at ggplot2 at Github https://raw.githubusercontent.com/tidyverse/ggplot2/master/R/data.R
#' @format A data frame with 200 rows and 1 variable
#' @docType data
"daDF"
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,68 @@
# WeibullR
An R package for Life Data Analysis

The anticipated re-packaging and augmentation of package abrem is now underway. The package is WeibullR (because you can’t have a dash in an R label). The primary application object has been refactored to wblr, and every effort has been made to assure functional consistency with the example scripts presented in *“Using abrem”*.

http://www.openreliability.org/using-abrem/

Much expansion of the package has already been implemented. Features such as:

- Interval data can now be input, analyzed and displayed.
Applicable options for the lognormal distribution have been fully implemented.
- An automated methodology for object modification by third parameter adjustment is provided.
- Fisher Matrix bound preparation is now included.
- Under the hood there has been much review to streamline code, consolidate files, refactor several option labels, revise legends and integrate all compiled C++ sources within a single package.
- A compiled package can be downloaded from R-Forge https://r-forge.r-project.org/R/?group_id=2252

Additionally, the source is available on Github:

https://github.com/Weibull-R/WeibullR

It is desired to have a community that will be kept up to date, so you are encouraged to set a “watch” on github and use the “issues” feature to communicate to the group.

# Example
- Install the package:

```R
devtools::install_github("Weibull-R/WeibullR")
```

- A script for using interval data and showing both bbb and fm bounds follows:

```R
library(WeibullR)
fail <- c(10,40,40,50)
susp <- c(20,60)
left <- c(0,0,0,20,10)
right <- c(30,70,100,80,85)
qty <- c(2,1,1,2,1)
interval_ex <- data.frame(left,right,qty)
ival_test <- wblr(fail, susp, interval_ex, col="red",interval.col="blue")
ival_test <- wblr.fit(ival_test, method.fit="mle-rba", col="darkgreen")
ival_test <- wblr.conf(ival_test, method.conf="bbb",lty=2, lwd=1, col="black")
ival_test <- wblr.conf(ival_test, method.conf="fm", col="purple")
plot(ival_test)
```
![](www/probability_plot.png)

- A script for automating 3p fitting with modification by to follow:

```R
library(WeibullR)
data('daDF')
# Alternative, read csv
# daDF <- read.table("./data/daDF.csv")
da <- as.vector(daDF[,1])
earlyda <- da[1:10]
midda <- da[11:131]
endda <- da[132:200]

earlyfit.3p <- wblr.fit(wblr(fail=earlyda, susp=c(midda,endda), col="orange", label="early life"), dist="weibull3p", modify.by.t0=T, col="orange")

midfit.3p <- wblr.fit(wblr(fail=midda, susp=c(earlyda,endda), col="red3", label="mid life"), dist="weibull3p", modify.by.t0=T, col="magenta")

endfit.3p <- wblr.fit(wblr(fail=endda, susp=c(earlyda,midda), col="navyblue", label="end life"), dist="weibull3p", modify.by.t0=T, col="blue")

plot.wblr(list(earlyfit.3p,midfit.3p,endfit.3p), legend.text.size=0.5, main="Division of Life Data Using 3p Weibull")
```
![](www/division_life_data.png)
200 changes: 200 additions & 0 deletions data/daDF.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
0.7
8.6
25
51.3
58.9
72.8
88.1
93.4
103
105.7
109.9
125.2
127.5
128.4
142.3
166.7
201.6
208.2
213.4
237.8
245.7
259.1
264.7
268.5
277.2
283.4
291.8
294.3
298.8
302.2
314.7
333.33
354.2
365.7
366.4
375.8
378.4
385.7
394.3
405.8
409.6
421.5
438.9
463.7
476.5
488.7
494.4
501.2
508.1
510.5
515.7
526.7
538.2
541.5
543.3
550.1
567.3
579.8
592.3
600
618.7
645.9
682.3
705.4
715
724.6
731.4
735
738.2
741.8
749.9
761.4
769.8
772.9
776.4
782.3
795.8
805.4
816.7
824.4
838.2
855.6
868.7
888.8
896.4
902.8
917.4
931.6
951.2
980.1
1000.3
1008.9
1014.8
1025.7
1041.3
1065.4
1089.8
1102.7
1113.3
1125.4
1128.4
1143.8
1166.6
1187.4
1197.3
1228.7
1259.4
1279.9
1295.6
1318.9
1339.2
1368.4
1411
1439.6
1467.9
1486.9
1513.3
1536.6
1551.2
1578.9
1605.3
1643.8
1659.4
1678.2
1687.3
1703.2
1708.6
1713.4
1723.2
1738.7
1744.2
1765.3
1780.1
1788.6
1798.9
1815.4
1828.5
1842.3
1849.2
1852.8
1853.4
1861.4
1865.2
1872.8
1895.5
1903.7
1905.6
1912
1918.4
1938.6
1986.7
1993.2
2001.8
2014.3
2045.8
2051.2
2055.7
2058.1
2064.3
2066.7
2067.1
2077.8
2089.4
2097.8
2101.4
2115.8
2129.4
2136.7
2147.9
2151.4
2155.3
2160.8
2165.4
2165.5
2187.9
2205.3
2207
2207.5
2208.9
2216.3
2221.1
2236.4
2242.5
2266.6
2289.2
2298.4
2323.5
2343.2
2355.6
2378.5
2400
2409.4
2435.1
2475.7
2512.3
2657.8
2795.2
2845.8
2985.4
3026.4
Binary file added data/daDF.rda
Binary file not shown.
15 changes: 15 additions & 0 deletions man/daDF.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added www/division_life_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added www/probability_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.