Re: Append a string to column namesHere is an example of the way I approach adding text to a column name.
Names Default To Here( 1 );
dt =
// Open Data Table: Big Class.jmp
// â Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << select columns( :height, :weight );
selCols = dt << get selected columns( string );
For Each( {col}, selCols,
Column( col ) << set name( col || " " || "Added Text" )
);Re: Append a string to column namesThis might be a completely different direction than you were thinking, but the attached workflow adds a string to all the column names by moving the column names down, transposing the table, adding a column with the constant string of 'abcd,' then concatenating this new column with the column names, and finishes by re-transposing and moving the column names up. It does change all the column modeling data types though, which is likely a problem.
To make it add to just some of the column names, you could use a formula column, rather than a constant column.
Again, this is less of a solution and more of a potential catalyst for a way to think about it. Perhaps others will chime in with better ideas.
Re: Append a string to column namesFor regex try using + instead of *

Re: Append a string to column namesgreat, thanks @jthi .
Hm, for the "apply to some columns" I hope there is some easy solution hiding somewhere in Recode?
Re: Append a string to column namesOr using a bit similar idea as @Jed_Campbell had, you could
- select the columns of interest and first row
- subset with selected rows and columns
- drop headers down
- transpose
- create your new column names
- go to recode
- use apply mapping from table




Re: Append a string to column namesOk, doesn't seem so ....
So, Jmp could be improved by copying this functionality from the Scripting Tools .
Here you can find the corresponding suggestion in the Wish List:
Recode and Recode Column Names: apply for specific rows/columns
Append a string to column namesWhat is the easiest way to append a string to columns names?
Not to all of them, but just to some selected ones.
Up to now, I used Rename Columns from the Jmp Scripting tools Add-In :
Scripting Tools

But the actions of the Add-In are not captured by the Workflow Builder.
This is why I am interested in how to do it directly in Jmp without the help of an add-in.
Replace String from the Recode Column Names menu looks similar.
a) Is there an option to apply the change just to some selected columns?
b) How must the Regex expression look like to add a string to the existing column names?
Using the same syntax as in Jmp Scripting tools/Rename Columns, the appended string is added twice:

Automation and ScriptingData Blending and CleanupQuality and Process Engineering