cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

Duplicate a column

Hello,

 

I'm relatively new to scirpting..

I'm interested in simply duplicate a column within the existing table. I would the duplicated column to be last and have a different name. 

After that, I would like to annonymize the original column.

 

Thanks 

4 REPLIES 4
uday_guntupalli
Level VIII

Re: Duplicate a column

@moti617

        

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );; 

dt << New Column("weight-dup",numeric,continuous,formula(:weight)); 

dt:weight-dup << delete formula ; // optional 
Best
Uday
moti617
Level II

Re: Duplicate a column

Thank you,

Happen to know the sript for annonyizing a column?

uday_guntupalli
Level VIII

Re: Duplicate a column

@moti617,
       Try the following. 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << anonymize( columns( :name, :age ), output table name( "anonymized" ) );

      Also, the following are really useful resources that you have at your disposal, that you should try and start exploring: 

 

1. Scripting Index 
2. Sample Data 
3. Books 
image.png

Best
Uday
moti617
Level II

Re: Duplicate a column

Thank you!

Appreciate the help.

Recommended Articles