Learn R Programming

cgraph (version 3.0.1)

cg_parm: Add Parameter

Description

Add a parameter node to the graph.

Arguments

value

numeric vector or array, value of the node (optional).

name

character scalar, name of the node (optional). In case name is missing, the node is tried to be added to the graph under an auto-generated name.

Value

cg_node, parameter.

Details

$parm(value = NULL, name = NULL)

Examples

Run this code
# NOT RUN {
# Initialize a new computational graph.
x <- cgraph$new()

# Add a parameter with value 1 and name 'p' to the graph.
x$parm(1, name = "p")

# }

Run the code above in your browser using DataLab