Skip to contents

Convenience wrapper that runs all fetch_* functions in a single call and returns a named list. Failed individual parsers produce a warning and return NULL for that element rather than stopping the entire call.

Usage

fetch_all(lst, digits = NA, shk_digits = NA, ofv_digits = NA, cn_digits = NA)

Arguments

lst

An object of class "lst" from read_lst_file().

digits

Integer or NA. Rounding for RSE values. Default NA.

shk_digits

Integer or NA. Rounding for ETA shrinkage. Default NA.

ofv_digits

Integer or NA. Rounding for OFV. Default NA.

cn_digits

Integer or NA. Rounding for condition number. Default NA.

Value

A named list with elements:

thetas

tibble from fetch_thetas(), or NULL on failure.

etas

tibble from fetch_etas(), or NULL on failure.

sigmas

tibble from fetch_sigmas(), or NULL on failure.

ofv

Numeric from fetch_ofv(), or NULL on failure.

condn

Numeric from fetch_condn(), NA if no covariance step, or NULL on failure.

Examples

path   <- system.file("extdata", "lst", "s01_focei_cov_success.lst",
                      package = "lstparsR")
lst    <- read_lst_file(path)
result <- fetch_all(lst)
result$thetas
#> # A tibble: 4 × 4
#>   parameter estimate    se   rse
#>   <chr>        <dbl> <dbl> <dbl>
#> 1 TH_1         4.37  0.312  7.14
#> 2 TH_2        31.2   2.05   6.57
#> 3 TH_3         1.15  0.143 12.4 
#> 4 TH_4         0.682 0.121 17.7 
result$ofv
#> [1] 1873.406