validateState: Validate and convert a number to a valid state.

Description Usage Arguments Value See Also Examples

View source: R/BNP_Helper.R

Description

Validate and convert a number to a valid state.

Usage

1
validateState(x, node.names)

Arguments

x

input integer representing the state, can be a vector of 0/1 or an int

node.names

network node names

Value

Numeric binary vector of the same length as the number of nodes. Each position corresponds to a node of the network. The values of each element are 0 or 1. The name of each element corresponds to the name of the node in that position in the network.

See Also

intToBits which this function wraps

Examples

1
2
3
validateState(162, cellcycle$genes)
validateState('162', cellcycle$genes)
validateState(c(0,1,0,0,0,1,0,1,0,0), cellcycle$genes)

mar-esther23/boolnet-perturb documentation built on April 21, 2020, 9:11 a.m.