Learn R Programming

PASWR2 (version 1.0.5)

CIRCUIT: Circuit Design Lifetime

Description

Results from an accelerated life test used to estimate the lifetime of four different circuit designs (lifetimes in thousands of hours)

Usage

CIRCUIT

Arguments

Format

A data frame with 26 observations on the following 2 variables:

  • lifetime (lifetimes in thousands of hours)

  • design (a factor with levels DesignI and DesignII)

References

Ugarte, M. D., Militino, A. F., and Arnholt, A. T. 2015. Probability and Statistics with R, Second Edition. Chapman & Hall / CRC.

Examples

Run this code
# NOT RUN {
# ggplot2 approach
ggplot(data = CIRCUIT, aes(x = design, y = lifetime, fill = design)) + geom_boxplot() + 
labs(x = "", y = "Lifetime in thousands of hours") + guides(fill = "none") + 
scale_fill_brewer()
ggplot(data = CIRCUIT, aes(x = design, y = lifetime, fill = design)) + geom_violin() + 
labs(x = "", y = "Lifetime in thousands of hours") + guides(fill = "none") + 
scale_fill_brewer()
# Reorder the boxplots by medians
ggplot(data = CIRCUIT, aes(x = reorder(design, lifetime, FUN = median),  lifetime, 
fill = design)) + geom_boxplot() + labs(x = "", y = "Lifetime in thousands of hours") + 
guides(fill = "none") + scale_fill_brewer()
# }

Run the code above in your browser using DataLab