Learn R Programming

epinetr (version 0.96)

getIncMatrix: Incidence matrix retrieval.

Description

Get an incidence matrix from a Population.

Usage

getIncMatrix(pop)

Arguments

pop

An object of class 'Population' which has an EpiNet object attached.

Value

An incidence matrix representing the epistatic network within the given Population object.

Details

getIncMatrix() retrieves the incidence matrix used in epistatic interactions within the given Population object. This is most useful for copying the network structure to a new Population object.

See Also

attachEpiNet

Examples

Run this code
# NOT RUN {
# Create population
pop <- Population(
  popSize = 200, map = map100snp, QTL = 20,
  alleleFrequencies = runif(100),
  broadH2 = 0.9, narrowh2 = 0, traitVar = 40
)

# Attach random epistatic network and retrieve incidence matrix
pop <- attachEpiNet(pop)
inc <- getIncMatrix(pop)

# Create second population
pop2 <- Population(
  popSize = 200, map = map100snp, QTL = 20,
  alleleFrequencies = runif(100),
  broadH2 = 0.8, narrowh2 = 0.6, traitVar = 40
)

# Attach epistatic network to second population
# using incidence matrix from first
pop2 <- attachEpiNet(pop2, incmat = inc)
# }

Run the code above in your browser using DataLab