Learn R Programming

gMCP (version 0.8-5)

replaceVariables: Replaces variables in a general graph with specified numeric values

Description

Given a list of variables and real values a general graph is processed and each variable replaced with the specified numeric value.

Usage

replaceVariables(graph, variables=list(), ask=TRUE)

Arguments

graph
A graph of class graphMCP or class entangledMCP.
variables
A named list with the specified real values, for example list(a=0.5, b=0.8, "tau"=0.5). If ask=TRUE and this list is missing at all or single variables are missing from the list, the user is asked for the values (if the se
ask
If FALSE all variables that are not specified are not replaced.

Value

  • A graph or a matrix with variables replaced by the specified numeric values.

See Also

graphMCP, entangledMCP

Examples

Run this code
graph <- HungEtWang2010()
replaceVariables(graph)
replaceVariables(graph, list("tau"=0.5,"omega"=0.5, "nu"=0.5))

Run the code above in your browser using DataLab