Skip to contents

Creates one mcdata mcnode per column in X, using ndvar = nrow(X). This is useful when X is a design matrix generated by sensitivity::sensitivity functions or sensobol::sobol_matrices().

Usage

matrix_to_mcnodes(X, envir = parent.frame())

Arguments

X

(matrix or data frame). Input values with one mcnode per column.

envir

(environment, optional). Environment where nodes are created. Default: parent.frame().

Value

NULL (invisibly). mcnodes created in envir.

Examples

X <- matrix(c(0.1, 0.2, 0.3, 10, 11, 12), ncol = 2)
colnames(X) <- c("a", "b")
matrix_to_mcnodes(X)