You can loop over your RandomNormal_dt.jmp with For Each Row and then get values from the columns. Use Eval(EvalExpr()) to add values to Formula.
Names Default To Here(1);
dt_random = New Table("RandomNormal_dt",
Add Rows(20),
New Column("Analysis Columns",
Character(6),
"Nominal",
Set Values(
{"Name1", "Name2", "Name3", "Name4", "Name5", "Name6", "Name7", "Name8", "Name9", "Name10", "Name11", "Name12", "Name13", "Name14","Name15", "Name16", "Name17", "Name18", "Name19", "Name20"}
),
),
New Column("Mean", Numeric, "Continuous", Format("Best", 6), Set Values([1, 1, 0, 0, 0, 2, 2, 3, 3, 5, 10, -5, -6, 3, 3, 3, 3, 3, 0.5, 0.5]), ),
New Column("Std Dev",
Numeric,
"Continuous",
Format("Best", 6),
Set Values(
[0.0059167075785471, 0.00455419279075633, 0.00421951193571742, 0.00421951193571742, 0.00440945078910684, 0.00440945078910684,
0.0102216984358101, 0.00419398115162298, 0.0808821732109718, 0.0876924473662647, 0.119338972830502, 0.0918654224334168,
0.0921864791037008, 0.0868549769597964, 0.0808821732109718, 0.0865262154672911, 0.186459394109712, 0.189566585675401, 0.0876924449303901,
0.0434724818197371]
),
)
);
//create collection table
dt = New Table("Analysis");
//lets use formulas, we can easily add more rows if needed
For Each Row(
dt_random,
columnName = As Column(dt_random, "Analysis Columns");
meanValue = As Column(dt_random, "Mean");
stdDevValue = As Column(dt_random, "Std Dev");
//use eval expr to get values in formula
Eval(Eval Expr(dt << New Column(columnName, Numeric, Continuous, Formula(Random Normal(Expr(meanValue), Expr(stdDevValue))))));
);
Then you can add rows as needed.After adding rows you can remove formulas to make the datatable faster if needed. If you know how many rows you need, you can replace Formula() with << Set Each Value() and create the collection with enough rows.
-Jarmo