bn_create | R Documentation |
Converts list to data frame which is a bit easier to work with, and embellishes with some useful columns. The function performs a few checks on the list, for instance to make sure the graph is acyclic and that variables used in the expressions are defined elsewhere or already known. The known_variables argument is for passing a character vector of variables names for variables that are already defined externally in a given dataset, which can be passed to bn_simulate whilst variable_formula is the variable name itself, this is to help with the bn_simulate function it doesn't actually lead to self-dependence (eg var depends on var)
bn_create(list, known_variables = NULL)
list |
of node objects, created by |
known_variables |
character vector of variables that will be provided by an external dataset |
data.frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.