The first 6 lines of the script below work as I expected, with output copied below.
Then I tried to store the values of these variables in a list, which didn't go well. It appears that the variable names instead of the values were stored. How do I store the variable values in the list? Thank you!
dt = new table("my table", new column("X", set values({-0.35, 0.15, 0.3}) ) );
dt << new column("Y", set values({300, 250, 200}) );
xmean = col mean (:X);
ymax = col max(:Y);
ymin = col min(:Y);
print (xmean, ymax, ymin);
dtsum = {xmean, ymax, ymin};
print (dtsum);
if (dtsum[1] < 0, print (dtsum[2]), print(dtsum[3]));
Outputs:
0.0333333333333333
300
200
{xmean, ymax, ymin}
.