meta.BSP: Sum parameter values from different parameters

View source: R/BSP.R

meta.BSPR Documentation

Sum parameter values from different parameters

Description

meta.BSP takes as input data equal to the first element of the output from BSP and combines (i.e. sum) the values of the parameters passed with the argument params. This could be useful, for example, when the analysis includes populations from a meta-population system and the user wants to calculate the size of meta-population (i.e. the total).

When multiple loci are used in the analysis, the argument locus can be used to indicate which locus should be used. If locus="max", then the largest locus number is used (which corresponds to the sum over all loci for multi-locus analyses).

Usage

meta.BSP(
  data = NULL,
  dir.out = NULL,
  params = NULL,
  locus = "max",
  save2disk = TRUE
)

Arguments

data

The data generated by BSP

dir.out

The local path to store the results. If NULL (default) then dir.out=wd()

params

A vector of parameter numbers to be combined and plotted

locus

The locus to be considered

save2disk

Whether to save results to disk (default: TRUE)

Value

A list with the combined data (as data.table) and a BSP.


carlopacioni/mtraceR documentation built on Nov. 3, 2023, 4:30 a.m.