cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
paul_apicella
Level III

Remove columns from a table

Hi everybody,

 

I need to export several tables (txt files containing 20 columns) under JMP, but only 10 columns are useful for my use.

How can I include in a script the deleting of specified columns? I have attached one example file: (1) the txt source (2) the JMP version with all columns (3) the final JMP version with 10 columns.

 

Thanks in advance,

 

Paul

2 REPLIES 2
txnelson
Super User

Re: Remove columns from a table

Here is the very simple script to delete the unwanted columns.

names default to here(1);
dt=current data table();
dt << delete columns("I-delai", "I-durée", "I-pos", 
	"R-delai", "N°-Rec", "E-durée", "TR-max", "TM-max", 
	"code-PP", "cod-R-d");

The details are covered in the scripting index

     Help==>Scripting Index

To get started with scripting, I suggest you read the Scripting Guide 

     Help==>JMP Documentation Library==>Scripting Guide

Jim
paul_apicella
Level III

Re: Remove columns from a table

Thanks txnelson,

 

You're absolutely right, the solutions (at least the simple ones) are in the scripting guide. We're always in a hurry to take the time to check it out.

All works well.

 

Have a good day

 

 

Paul