cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
gutloja
Level III

Save "Predicteds" with a specific column name

Hello, All.

Quick question.

Is there a way to save predicteds with a specific column name?

When I use something like this to save predicteds:

Bivariate << (curve[1] << save predicteds);

It saves as "Predicted Name of predicted variable".

Thank you for your time & help,

-JoseL

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Save "Predicteds" with a specific column name

Because JMP will save the predicted as a new column at the far right of your data table, you can use the following code to change the name to whatever name you want to give it:

Assuming you have referenced your data table using a variable called "dt" (i.e. dt=current data table();)

column(N Cols(dt)) << set name("Your new name");

Jim

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: Save "Predicteds" with a specific column name

Because JMP will save the predicted as a new column at the far right of your data table, you can use the following code to change the name to whatever name you want to give it:

Assuming you have referenced your data table using a variable called "dt" (i.e. dt=current data table();)

column(N Cols(dt)) << set name("Your new name");

Jim
gutloja
Level III

Re: Save "Predicteds" with a specific column name

Thanks a lot Jim, this worked like a charm.

-JL

mredford
Level II

Re: Save "Predicteds" with a specific column name

Hi, I'm trying to do this as well. Did you save the predicteds column manually, or was this scripted? I'm hoping to automate the process and script the saving of the column, so if you scripted this, could you share the syntax you used? Thanks!

txnelson
Super User

Re: Save "Predicteds" with a specific column name

Here is a sample script that you should be able to use

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );
biv = Bivariate( Y( :NPN1 ), X( :PNP1 ), Fit Line( {Line Color( {213, 72, 87} )}, save predicteds ) );
biv << (curve[1] << save predicteds);
Column( N Cols( dt ) ) << set name( "Your new name" );
Jim
mredford
Level II

Re: Save "Predicteds" with a specific column name

Perfect! Thank you so much, I have been struggling all morning to automate this for the spline fit. Thank you for your quick response as well!!