getParams: Get model parameters

View source: R/getParams.R

getParamsR Documentation

Get model parameters

Description

Extract model parameters of a mutation matrix/model.

Usage

getParams(mut, params = NULL, format = 1, sep = "/")

Arguments

mut

A mutationModel() or mutationMatrix().

params

A vector contain some or all of the words "model", "rate", "range", "rate2", "seed". If NULL (default), all present parameters are included.

format

A numeric code indicating the wanted output format. See Value.

sep

A separator character used to paste male and female values. Ignored unless format = 3.

Value

When mut is a mutationModel with different male/female parameters, the output format is dictated by the format option, with the following possibilities:

  1. A data frame with 2 rows labelled 'female' and 'male'.

  2. A data frame with 1 row and female/male columns suffixed by .F/.M respectively.

  3. A data frame with 1 row, in which female/male values are pasted together (separated with sep) if different.

If mut is a mutationMatrix the output always has 1 row.

Examples

M = mutationModel("equal", 1:2, rate = list(female = 0.2, male = 0.1))
getParams(M)
getParams(M, format = 2)
getParams(M, format = 3)
getParams(M, format = 3, sep = "|")


magnusdv/pedmut documentation built on Jan. 31, 2024, 7:06 a.m.