Skip to content

Commit 2ccd664

Browse files
committed
Update README
1 parent bee4214 commit 2ccd664

File tree

5 files changed

+30
-14
lines changed

5 files changed

+30
-14
lines changed

.Rproj.user/CB2BA49E/pcs/files-pane.pper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"ascending": true
66
}
77
],
8-
"path": "~/Documents/ReliaGrowR"
8+
"path": "~/Documents/ReliaGrowR/R"
99
}

R/rga.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@
156156
#' @importFrom stats lm predict AIC BIC logLik cor residuals
157157
#' @importFrom segmented segmented slope intercept seg.control
158158
#' @export
159+
160+
161+
159162
rga <- function(times, failures, model_type = "Crow-AMSAA", breaks = NULL, conf_level = 0.95) {
160163
if (is.data.frame(times)) {
161164
if (!all(c("times", "failures") %in% names(times))) {
@@ -224,7 +227,7 @@ rga <- function(times, failures, model_type = "Crow-AMSAA", breaks = NULL, conf_
224227
log_cum_failures <- log(cum_failures)
225228

226229
# Check for perfect collinearity
227-
cor_val <- suppressWarnings(cor(log_times, log_cum_failures))
230+
cor_val <- suppressWarnings(stats::cor(log_times, log_cum_failures))
228231
if (is.na(cor_val) || abs(cor_val - 1) < .Machine$double.eps^0.5 ||
229232
abs(cor_val + 1) < .Machine$double.eps^0.5) {
230233
stop("Perfect collinearity detected between predictor ('log_times') and response ('log_cum_failures'). Regression cannot be performed.")

R/srr-stats-standards.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
#' @srrstatsNA {G2.9} No information is lost in type conversions.
1515
#' @srrstatsNA {G2.12} list columns in `data.frame` objects are not used.
1616
#' @srrstatsNA {G3.0} There are no comparisons made between floating point numbers.
17-
#' @srrstatsNA {G3.1} There are no covariance calculations.
18-
#' @srrstatsNA {G3.1a} There are no covariance calculations.
17+
#' @srrstatsNA {G3.1} Currently, there are no covariance calculations since all models
18+
#' are univariate. However, this may change in future versions.
19+
#' @srrstatsNA {G3.1a} Currently, there are no covariance calculations since all models
20+
#' are univariate. However, this may change in future versions.
1921
#' @srrstatsNA {G4.0} There are no local file outputs at this time.
2022
#' @srrstatsNA {G5.3} Missing values return an error.
2123
#' @srrstatsNA {G5.4a} There are new implementations of existing methods but no new methods.

README.Rmd

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Welcome to **ReliaGrowR**! This package provides modeling and plotting functions
3434
* Piecewise NHPP
3535
* Piecewise NHPP with Change Point Detection
3636

37+
RGA is an important part of reliability engineering, focused on improving reliability during development and testing of products.
38+
By analyzing failure data, RGA helps engineers and researchers identify trends, estimate reliability parameters, and track improvements over time.
39+
3740
To learn more about RGA and this package, please view the [vignette](https://paulgovan.github.io/ReliaGrowR/articles/RGA.html).
3841

3942
## Installation
@@ -52,25 +55,25 @@ devtools::install_github('paulgovan/ReliaGrowR')
5255

5356
## Example
5457

55-
Here is a basic example of Reliability Growth Analysis:
56-
57-
First, load the package:
58+
Here is a basic example of Reliability Growth Analysis. First, load the package.
5859
```{r}
5960
library(ReliaGrowR)
6061
```
6162

62-
Next, set up some cumulative time and failure data:
63+
Next, suppose a machine has failed at the following times with the corresponding number of failures.
6364
```{r}
6465
times <- c(100, 200, 300, 400, 500)
6566
failures <- c(1, 2, 1, 3, 2)
6667
```
6768

68-
Then run the rga and plot the results:
69+
To perform RGA, use the `rga` function and plot the results. The plot displays the cumulative failures over time along with the fitted reliability growth model.
6970
```{r}
7071
result <- rga(times, failures)
7172
plot(result, main = "Reliability Growth Analysis", xlab = "Cumulative Time", ylab = "Cumulative Failures")
7273
```
7374

75+
76+
7477
## Code of Conduct
7578

7679
Please note that the ReliaGrowR project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ functions for Reliability Growth Analysis (RGA), including:
2828
- Piecewise NHPP
2929
- Piecewise NHPP with Change Point Detection
3030

31+
RGA is an important part of reliability engineering, focused on
32+
improving reliability during development and testing of products. By
33+
analyzing failure data, RGA helps engineers and researchers identify
34+
trends, estimate reliability parameters, and track improvements over
35+
time.
36+
3137
To learn more about RGA and this package, please view the
3238
[vignette](https://paulgovan.github.io/ReliaGrowR/articles/RGA.html).
3339

@@ -47,22 +53,24 @@ devtools::install_github('paulgovan/ReliaGrowR')
4753

4854
## Example
4955

50-
Here is a basic example of Reliability Growth Analysis:
51-
52-
First, load the package:
56+
Here is a basic example of Reliability Growth Analysis. First, load the
57+
package.
5358

5459
``` r
5560
library(ReliaGrowR)
5661
```
5762

58-
Next, set up some cumulative time and failure data:
63+
Next, suppose a machine has failed at the following times with the
64+
corresponding number of failures.
5965

6066
``` r
6167
times <- c(100, 200, 300, 400, 500)
6268
failures <- c(1, 2, 1, 3, 2)
6369
```
6470

65-
Then run the rga and plot the results:
71+
To perform RGA, use the `rga` function and plot the results. The plot
72+
displays the cumulative failures over time along with the fitted
73+
reliability growth model.
6674

6775
``` r
6876
result <- rga(times, failures)

0 commit comments

Comments
 (0)