prepare_refdata: Prepare the reference data included in the package

View source: R/prepare_refdata.R

prepare_refdataR Documentation

Prepare the reference data included in the package

Description

This function loads (and interpolates on) pre-built reference datasets. The available datasets of a valid data-package can be listed with list_refs.

Usage

prepare_refdata(ref, datapkg, n.inter = NULL, by.inter = NULL)

Arguments

ref

the name of the reference dataset to load (as given in list_refs).

datapkg

the name of the data-package to load the rreference from.

n.inter, by.inter

the resolution of the interpolation, as in seq(start, end, length.out = n.inter) or seq(start, end, by = by.inter).

Value

a list with the interpolated reference dataset and its associated time series.

See Also

list_refs ge_im

Examples


requireNamespace('wormRef', quietly = TRUE)

# get some samples to stage
samp <- wormRef::Cel_larval$g[,13:15]

# load interpolated reference
r_larv <- prepare_refdata(ref = 'Cel_larval', datapkg = 'wormRef' , n.inter = 200)

# perform age estimate
ae_test <- ae(samp, r_larv)

# check output
summary(ae_test)
plot(ae_test) # plot all sample estimates
plot_cor(ae_test) # plot individual correlation profiles of samples

# get results
ae_test$age.estimates


LBMC/wormAge documentation built on April 6, 2023, 3:52 a.m.