View source: R/per_marker_kl.R
| per_marker_kl_profile | R Documentation |
Vectorised wrapper around per_marker_kl() for a list of marker_model
objects. Returns a data.frame with one row per input model in input
order. When the profile shares one pedigree topology, uses no linkage,
and every mutation model is wired to the C++ backend
(none / equal / stepwise), evaluation routes through a single
cross-marker C++ batch call with a shared mutation-matrix cache;
otherwise it falls back to a per-marker R-level loop.
All models must share the same pedigree topology if poi is supplied as
a scalar; otherwise the POI is resolved independently for each model.
per_marker_kl_profile(models, poi = NULL)
models |
A |
poi |
Optional character scalar applied to every model, or |
A data.frame with the same columns as per_marker_kl() and
nrow(out) == length(models). When poi is a scalar, attribute
"poi" carries that value; otherwise the resolved POIs appear as
attribute "poi" of length length(models).
per_marker_kl().
if (requireNamespace("pedtools", quietly = TRUE)) {
ped <- pedtools::nuclearPed(1)
models <- list(
M1 = marker_model(ped, "M1", c("a" = 0.4, "b" = 0.6),
mutation = list(model = "equal", rate = 1e-3)),
M2 = marker_model(ped, "M2", c("a" = 0.2, "b" = 0.3, "c" = 0.5),
mutation = list(model = "equal", rate = 1e-3))
)
per_marker_kl_profile(models)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.