is.observed {MoTBFs}R Documentation

Observed Node

Description

is.observed() checks whether a node belongs to the evidence set or not.

Usage

is.observed(node, evi)

Arguments

node

A character string, matching the node's name.

evi

A data.frame of the evidence set.

Value

This function returns TRUE if "node" is included in "evi", or, otherwise, FALSE.

Examples


## Data frame of the evidence set
  obs <- data.frame(lip = "1", alm2 = 0.5, stringsAsFactors=FALSE)
  
## Check if x is in obs
  is.observed("x", obs)

[Package MoTBFs version 1.4.1 Index]