cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Muhu
Level I

How do I concatenate variable column name with a string?

This is what I have:

 

for ( k = 1, k < selColumn, k++,
ColumnName = selColumnNames[k];
dt << New Column( dt:ColumnName );
);

 

 

This what I want:

for ( k = 1, k < selColumn, k++,
ColumnName = selColumnNames[k];
dt << New Column( dt:ColumnName || "Mean" );
);

selColumnNames is a list of all the column names in my table.

1 ACCEPTED SOLUTION

Accepted Solutions
Muhu
Level I

Re: How do I concatenate variable column name with a string?

I was able to solve it, here is the code:

for ( k = 1, k < selColumn, k++,
ColumnName = "Mean_" || selColumnNames[k];
dt << New Column( ColumnName );
);

View solution in original post

1 REPLY 1
Muhu
Level I

Re: How do I concatenate variable column name with a string?

I was able to solve it, here is the code:

for ( k = 1, k < selColumn, k++,
ColumnName = "Mean_" || selColumnNames[k];
dt << New Column( ColumnName );
);

Recommended Articles