MyNixOS website logo
Description

Statistical Methods for Composite Material Data.

An implementation of the statistical methods commonly used for advanced composite materials in aerospace applications. This package focuses on calculating basis values (lower tolerance bounds) for material strength properties, as well as performing the associated diagnostic tests. This package provides functions for calculating basis values assuming several different distributions, as well as providing functions for non-parametric methods of computing basis values. Functions are also provided for testing the hypothesis that there is no difference between strength and modulus data from an alternate sample and that from a "qualification" or "baseline" sample. For a discussion of these statistical methods and their use, see the Composite Materials Handbook, Volume 1 (2012, ISBN: 978-0-7680-7811-4). Additional details about this package are available in the paper by Kloppenborg (2020, <doi:10.21105/joss.02265>).

cmstatr

R-CMD-check Codecov testcoverage DOI CRAN_Status_Badge

What It Does

The cmstatr package provides functions for performing statistical analysis of composite material data. The statistical methods implemented are those described in CMH-17-1G. This package focuses on calculating basis values (lower tolerance bounds) for material strength properties, as well as performing the associated diagnostic tests. Functions are also provided for testing for equivalency between alternate samples and the “qualification” or “baseline” samples.

Additional details about the package are available in the paper by Kloppenborg (2020, https://doi.org/10.21105/joss.02265).

There is a companion package cmstatrExt which provides statistical methods that are not included in CMH-17, but which may be of use to practitioners. For more information, please see the cmstatrExt Website.

Installation

To install cmstatr from CRAN, simply run:

install.packages("cmstatr")

If you want the latest development version, you can install it from github using devtools. This will also install the dependencies required to build the vignettes. Optionally, change the value of the argument ref to install cmstatr from a different branch of the repository.

install.packages(c("devtools", "rmarkdown", "dplyr", "tidyr"))
devtools::install_github("cmstatr/cmstatr", build_vignettes = TRUE,
                         ref = "master",
                         build_opts = c("--no-resave-data", "--no-manual"))

Usage

To compute a B-Basis value from an example data set packaged with cmstatr you can do the following:

library(dplyr)
library(cmstatr)

carbon.fabric.2 %>%
  filter(test == "FC") %>%
  filter(condition == "RTD") %>%
  basis_normal(strength, batch)
#> 
#> Call:
#> basis_normal(data = ., x = strength, batch = batch)
#> 
#> Distribution:  Normal    ( n = 18 )
#> B-Basis:   ( p = 0.9 , conf = 0.95 )
#> 76.88082

For more examples of usage of the cmstatr package, see the tutorial vignette, which can be viewed online, or can be loaded as follows, once the package is installed:

vignette("cmstatr_Tutorial")

There is also a vignette showing some examples of the types of graphs that are typically produced when analyzing composite materials. You can view this vignette online, or you can load this vignette with:

vignette("cmstatr_Graphing")

Philosophical Notes

This package expects tidy data. That is, individual observations should be in rows and variables in columns.

Where possible, this package uses general solutions. Look-up tables are avoided wherever possible.

Issues

If you’ve found a bug, please open an issue in this repository and describe the bug. Please include a reproducible example of the bug. If you’re able to fix the bug, you can do so by submitting a pull request.

If your bug is related to a particular data set, sharing that data set will help to fix the bug. If you cannot share the data set, please strip any identifying information and optionally scale the data by an unspecified factor so that the bug can be reproduced and diagnosed.

Contributing

Contributions to cmstatr are always welcomed. For small changes (fixing typos or improving the documentation), go ahead and submit a pull request. For more significant changes, such as new features, please discuss the proposed change in an issue first.

Contribution Guidelines

  • Please create a git branch for each pull request (PR)
  • Before submitting a pull request, please make sure that R CMD check passes with no errors, warnings or notes
  • New and modified code should follow the style guide enforced by the lintr package
  • Document all exported functions using roxygen2
  • Write tests using testthat. If your contribution fixes a bug, then the test(s) that you add should fail before your bug-fix patch is applied and should pass after the code is patched.
  • For changes that affect the user, add a bullet at the top of NEWS.md below the current development version

Development

Testing is performed using testthat. Edition 3 of that package is used and parallel processing enabled. If you wish to use more than two CPUs, set the environment variable TESTTHAT_CPUS to the number of CPUs that you want to use. One way of doing this is to create the file .Rprofile with the following contents. This file is ignored both by git and also in .Rbuildingore.

Sys.setenv(TESTTHAT_CPUS = 8)
Metadata

Version

0.9.3

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows