as.bn.matrix: Convert a matrix to a 'bn'.

Description Usage Arguments Value Examples

View source: R/convert.R

Description

See for 'as.parental.matrix' for details

Usage

1
2
  ## S3 method for class 'matrix'
 as.bn(x, ...)

Arguments

x

A matrix, as described in as.parental.matrix()

...

Passed to as.parental.matrix

Value

An object of class 'bn'

Examples

1
2
3
edgelist <- matrix(c(c(1,2), c(2, 3)), byrow = TRUE, nrow = 2, ncol = 2)
colnames(edgelist) <- c("row", "col")
as.bn(edgelist, type = "edgelist", n = 3)

rjbgoudie/parental documentation built on May 27, 2019, 9:11 a.m.