Learn R Programming

calmate (version 0.13.0)

thetaAB2TotalAndFracB.array: 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 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

Run this code
# NOT RUN {
# 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));
# }

Run the code above in your browser using DataLab