cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP Wish List

We want to hear your ideas for improving JMP software.

  1. Search: Please search for an existing idea first before submitting a new idea.
  2. Submit: Post your new idea using the Suggest an Idea button. Please submit one actionable idea per post rather than a single post with multiple ideas.
  3. Kudo & Comment Kudo ideas you like, and comment to add to an idea.
  4. Subscribe: Follow the status of ideas you like. Refer to status definitions to understand where an idea is in its lifecycle. (You are automatically subscribed to ideas you've submitted or commented on.)

We consider several factors when looking for what ideas to add to JMP. This includes what will have the greatest benefit to our customers based on scope, needs and current resources. Product ideas help us decide what features to work on next. Additionally, we often look to ideas for inspiration on how to add value to developments already in our pipeline or enhancements to new or existing features.

Choose Language Hide Translation Bar
0 Kudos

Simple way to copy and paste columns

What inspired this wish list request? 

There are many instances when I need to combine columns from different data tables into a new table. I know there are workarounds to do this (subsets, get script, etc), but why can't there be a simple copy column/paste column command?

 

What is the improvement you would like to see? 

Add copy/paste column commands to JSL

 

Why is this idea important? 

Makes a common task very simple instead of resorting to more complex JSL workarounds.

 

4 Comments
hogi
Level XI

you mean:
 << copy column as a synonym for << get script?

If  copy column(col), is also fine,  you could create a wrapper for << get script:

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt2 = Open( "$SAMPLE_DATA/Big Class Families.jmp" );

dt << New Formula Column(
	Operation( Category( "Combine" ), "Ratio" ),
	Columns( :height, :weight )
);

copy column = Function({col},
	script = col << get script
);

paste column = Function({},
	script
);

copy column (Name Expr(Column("height/weight")));
Current data table(dt2);
paste column();

And via the GUI,  copy column / paste column is available:

hogi_0-1722272561377.png

scott1588
Level IV

I'm looking for something that is as simple as the copy/paste column items in the GUI but for JSL.

 

Just dt << copy column (:name)

and

dt2 << paste column

no expr or any other JSL involved.

 

Maybe with a couple of position modifiers such as <after :colname>, <end>, etc.

scott1588
Level IV

Interestingly... there is a Copy Column command listed in the scripting index. But it has no information about it. I can't find it in the scripting guide.

 

But there is no Paste Column.

scott1588
Level IV

Another interesting variation of this might be to add modifiers to the New Table command to list columns to pull from other tables

 

New Table (dt1:colname, dt1:colname2, dt2:colname3)

 

This would create a New Table with the columns pulled from dt1 and dt2