rconstant: Use a single constant value for a root node
Description
This is a small convenience function that simply returns the value passed to it, in order to allow the use of a constant node as root node in the sim_from_dag function.
Usage
rconstant(n, constant)
Value
Returns a vector of length n with the same type as constant.
Arguments
n
The number of times the constant should be repeated.
constant
A single value of any kind which is used as the only value of the resulting variable.