powered by
Add a constant node to the active graph.
const(value = NULL, name = NULL)
numeric vector or array, value of the node (optional).
character scalar, name of the node (optional). In case argument name is missing, the node is tried to be added to the graph under an auto-generated name.
name
cg_node, constant.
# NOT RUN { # Initialize a new computational graph. x <- cgraph$new() # Add a constant with value 1 and name 'c' to the graph. const(1, name = "c") # }
Run the code above in your browser using DataLab