Learn R Programming

cgraph (version 6.0.1)

cg_input: Add Input

Description

Add an input node to the active graph.

Usage

cg_input(name = NULL)

Arguments

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 an input with name 'a' to the graph.
a <- cg_input(name = "a")

# Set the value to 2
a$value <- 2

# }

Run the code above in your browser using DataLab