Is there a way to write the 5th line below so that it works (while keeping it within a single expression / single line) ?
More generally, how can a vector be initiated by specifying formulas instead of values for each element?
proc iml;
x = j(3,2,.);
do i = 1 to nrow(x);
/*this doesn't work*/
x[i,] = { i 0 };
/*this does work, but it's an extra line */
x[i,1] = i;
x[i,2] = 0;
end;
quit