thetaAB2TotalAndFracB.array: Converts an Jx2xI array between (thetaA,thetaB) and...

thetaAB2TotalAndFracB.arrayR Documentation

Converts an Jx2xI array between (thetaA,thetaB) and (total,fracB) formats

Description

Converts an Jx2xI array between (thetaA,thetaB) and (total,fracB) formats.

Usage

## S3 method for class 'array'
thetaAB2TotalAndFracB(data, ..., verbose=FALSE)

Arguments

data

An Jx2xI numeric array, where J is the number of SNPs, 2 is the number of alleles, and I is the number of samples.

...

Not used.

verbose

See Verbose.

Value

Returns an Jx2xI numeric array.

Examples

# Load example (thetaA,thetaB) signals
path <- system.file("exData", package="calmate");
theta <- loadObject("thetaAB,100x2x40.Rbin", path=path);

data <- thetaAB2TotalAndFracB(theta);
str(data);

theta2 <- totalAndFracB2ThetaAB(data);
str(theta2);

stopifnot(all.equal(theta2, theta));

calmate documentation built on March 18, 2022, 5:26 p.m.