read_gadget_likelihood: Read Gadget likelihood file

Description Usage Arguments Details Value Examples

Description

Read Gadget likelihood file

Usage

1
read_gadget_likelihood(likelihoodfiles, main = NULL, path = NULL)

Arguments

likelihoodfiles

Character. The name of the likelihood file

main

Optional. A list of class gadget_main

path

Optional. Character vector of path to the directory where Gadget files are located

Details

There are a number of different likelihood types in a Gadget model. This function will retrieve the likelihood file, sort and organize each component into its respective likelihood type, and return a list with each item of the list containing a data.frame of all the components within a respective likelihood type.

Value

A list of data.frames; one for each likelihood type. The returned list also has class gadget_likelihood

Examples

1
2
3
4
5
6
7
lik <- read_gadget_likelihood(system.file("gadget_model/likelihood",
                              package = "gadgetSim"))

## Using the main and path arguments instead
path <- system.file(gad_mod_dir, package = "gadgetSim")
main <- read_gadget_main(path = path)
lik <- read_gadget_likelihood(main = main, path = path)

inspktrgadget/gadgetSim documentation built on May 10, 2019, 9:51 a.m.