Learn R Programming

cgraph (version 6.0.1)

cg_parameter: Add Parameter

Description

Add a parameter node to the active graph.

Usage

cg_parameter(value, name = NULL)

Arguments

value

numerical vector or array, value of the node.

name

character scalar, name of the node (optional). In case argument name is missing, the node is added to the graph under an automatically generated name.

Value

cg_node object.

Examples

Run this code
# NOT RUN {
# Initialize a computational graph
graph <- cg_graph()

# Add a parameter with value 1 and name 'a' to the graph.
a <- cg_parameter(1, name = "a")

# }

Run the code above in your browser using DataLab