Hello,
I have a character column with an unknown number of different values.
I would like to add a string prefix to each value but I struggle with doing so in an efficient way without creating a new column and without a for loop because it is slow.
Example for a single value:
Value is "12"
new value should be "PREFIX 12"
Is there a way to do this with JMP 12?
Here is the code without the step to add the prefix:
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt:Age << Data Type( Character );
// Get the values of age into a vector
ageVals = dt:Age << getValues;
// do not know what to do here. would like to add a PREFIX without a for loop (which would be slow)
???
// Put the new values back into the column
dt:Age << setValues(ageVals);
Best regards,
Alex