Hi, I don't have JMP 12 loaded anymore but I think all of what I used here was around in JMP 12... give this a go.
Cheers,
Brady
p.s.--we've added a lot of cool stuff since JMP 12 !!
Names Default To Here(1);
//replicate your original table
dt = New Table( "sports",
New Column( "Items", Character, "Nominal",
Set Values( {"soccer", "volleyball", "7tennis", "basketball"} ),
)
);
//get a list of desired column names.
colNameList = dt:items << get values;
/*
If you're creating a new table: build a 1 row, n column matrix of missing data
with the J() function and the As Table() function, which lets you set column names
easily.
*/
newDt = as table (J (1, nitems(colNameList), .), <<column names( colNameList));
//if you're overwriting onto your present table:
for (i=1, i<=nitems(colNameList), i++,
try(
column(dt, i) << set name(colNameList[i]) //try to change ith column name
,
dt << new column (colNameList[i]) // if no ith column exists, create one
)
);