Learn R Programming

fbnet (version 1.0.4)

initBN: initBN: a function to initialize the bayesian network.

Description

initBN: a function to initialize the bayesian network.

Usage

initBN(ped = NULL, bplotped = FALSE)

Value

A bayesian network.

Arguments

ped

A ped object with information of the genotyped members. The ped object must be in Familias format.

bplotped

An alternative ped object to be compared.

Examples

Run this code
ped <- list(
  id = c(1, 2, 3),
  father = c(0, 0, 1),
  mother = c(0, 0, 2),
  sex = c(1, 2, 1),  # 1 = male, 2 = female
  genotype = c("AA", "AB", "BB")
)
bplotped <- list(
  id = c(4, 5),
  father = c(0, 4),
  mother = c(0, 5),
  sex = c(1, 2),
  genotype = c("AB", "AA")
)

Run the code above in your browser using DataLab