I'm trying to do the following:
R = {a, b, c, d, e, f, g, h, i};
Table[R[[n]] = RandomInteger[{0, 20}], {n, 1, Length[R]}]
My intention is to assign a random value to each of these variables. But somehow it's not working. What else do I need to do? I've tried to do:
ToExpression[R[[n]] = RandomInteger[{0, 30}]]
And:
Evaluate[R[[n]] = RandomInteger[{0, 30}]]
Scan[(# = RandomInteger[{0, 30}]) &, R]
. $\endgroup$