glance.basis {cmstatr}R Documentation

Glance at a basis object

Description

Glance accepts an object of type basis and returns a tibble::tibble() with one row of summaries for each basis value.

Glance does not do any calculations: it just gathers the results in a tibble.

Usage

## S3 method for class 'basis'
glance(x, include_diagnostics = FALSE, ...)

Arguments

x

a basis object

include_diagnostics

a logical value indicating whether to include columns for diagnostic tests. Default FALSE.

...

Additional arguments. Not used. Included only to match generic signature.

Details

For the pooled basis methods (basis_pooled_cv and basis_pooled_sd), the tibble::tibble() returned by glance will have one row for each group included in the pooling. For all other basis methods, the resulting tibble will have a single row.

If include_diagnostics=TRUE, there will be additional columns corresponding with the diagnostic tests performed. These column(s) will be of type character and will contain a "P" if the diagnostic test passed, a "F" if the diagnostic test failed, an "O" if the diagnostic test was overridden or NA if the test was not run (typically because an optional argument was not passed to the function that computed the basis value).

Value

A tibble::tibble() with the following columns:

See Also

basis()

Examples

set.seed(10)
x <- rnorm(20, 100, 5)
b <- basis_normal(x = x)
glance(b)

## # A tibble: 1 x 7
##       p  conf distribution modcv     n r     basis
##   <dbl> <dbl> <chr>        <lgl> <int> <lgl> <dbl>
## 1   0.9  0.95 Normal       FALSE    20 NA     92.0


glance(b, include_diagnostics = TRUE)

## # A tibble: 1 x 11
##        p  conf distribution modcv     n r     basis outliers_within…
##    <dbl> <dbl> <chr>        <lgl> <int> <lgl> <dbl> <chr>
##  1   0.9  0.95 Normal       FALSE    20 NA     92.0 NA
## # … with 3 more variables: between_batch_variability <chr>,
## #   outliers <chr>, anderson_darling_normal <chr>


[Package cmstatr version 0.9.3 Index]