knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(ReliaLearnR)
The ReliaLearnR package includes several helper functions to calculate common reliability metrics. These functions include:
rel(outageTime, totalTime): Calculates reliability given the outage time and total time.avail(unavailTime, totalTime): Calculates availability given the unavailable time and total time.mttf(failures, totalTime): Estimates the Mean Time To Failure.mtbf(failures, totalTime): Estimates the Mean Time Between Failures.fr(failures, totalTime): Estimates the failure rate.This vignette provides examples of how to use these functions.
To calculate the reliability of an item that ran for 3 years total and was failed for 5 of those days:
result <- rel(5, 3 * 365) cat(result)
To calculate the availability of an item that ran 3 years total, was failed for 5 days, and had scheduled maintenance for 14 days:
result <- avail(5 + 14, 3 * 365) cat(result)
The MTTR can be estimated with the base function mean. The MTTR for 5 failures with repair times in days of 5, 10, 15, 8, and 12:
result <- mean(c(5, 10, 15, 8, 12)) cat(result)
To estimate the MTTF for an item that failed 5 times over a 3-year period:
result <- mttf(5, 3 * 365) cat(result)
To estimate the MTBF for an item that failed 5 times over a total time of 45,000 hours:
result <- mtbf(5, 45000) cat(result)
To estimate the failure rate for 100 items that ran for 5000 hours and had 75 failures:
result <- fr(75, 100 * 5000) cat(result)
The Exponential failure probability can be estimated with the base function pexp. To estimate the probability of survival at time 5 for an item with a failure rate of 0.1:
result <- 1 - pexp(5, 0.1) cat(result)
The $B_n$ life for the Exponential distribution can be estimated with the base function qexp. To estimate the B10 life for an item with a failure rate of 0.1:
result <- qexp(0.1, 0.1) cat(result)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.