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
lwx228
Level VIII

How do I implement this "Copy With Column Names" operation with JSL?

I did not find the manual. I tried:

 

dt << GetEditCopyLabel;
dt << GetEditCopyWithColumnNames;


but it was not successful.Thank you very much!

2018-08-27_17-43-03.png

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: How do I implement this "Copy With Column Names" operation with JSL?

Main Menu() should work. But before execution the data table must be moved to the front. Otherwise, "copy with column names" is not available in the Edit Menu.

 

Try this! (works in JMP 14 for Mac, possibly in other versions too)

// Before running, select columns and rows of interest, or deselect all to copy the whole table to clipboard
Current Data Table() << Bring Window To Front;
Wait(0);
Main Menu("Copy With Column Names");

 

View solution in original post

txnelson
Super User

Re: How do I implement this "Copy With Column Names" operation with JSL?

With luck, @ms may have a method using Main Menu().

However, the Copy Table option from a Table Box() is a universal option in JMP for any given table box in a report output.  And in many cases, there are multiple table boxes in a given display.  The method that I use to access a particular table box from a given report output from a JMP Platform, is to reference the Tree Structure table box that I need information from, and then sent it the message "<< Copy Data" (See Help==>Books==>Scripting Index==>Display Trees).  The JSL below illustrates that method

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Boston Housing.jmp" );
pp = dt << Partition(
	Y( :mvalue ),
	X(
		:crim,
		:zn,
		:indus,
		:chas,
		:nox,
		:rooms,
		:age,
		:distance,
		:radial,
		:tax,
		:pt,
		:b,
		:lstat
	),
	Split Best( 3 )
);

Report( pp )[Table Box( 1 )] << copy data;
Jim

View solution in original post

9 REPLIES 9
lwx228
Level VIII

Re: How do I implement this "Copy With Column Names" operation with JSL?

Just copy data and column names to the paste board, thanks!
txnelson
Super User

Re: How do I implement this "Copy With Column Names" operation with JSL?

I searched the Scripting Index for possible commands Copy with Column Names, and did not find an answer

     Help==>Scripting Index==>Clipboard

I also tried using the Main Menu() function, that will bring up many of the commands from the Pull Down menus, but it did not work either.(See MS response below)

What are you planning to use the information you have copied into the Clipboard?  There may be a solution if you could explain what you are going to be doing.

Jim
lwx228
Level VIII

Re: How do I implement this "Copy With Column Names" operation with JSL?

I see. I'm not going to do that.
I am ready to transfer the results of JMP processing to excel and use VBA to further extract the desired results. VBA is very skilled.
Thank Jim!
gzmorgan0
Super User (Alumni)

Re: How do I implement this "Copy With Column Names" operation with JSL?

As Jim stated, it is not clear what you are trying to do.

If you want a copy of the entire table:

  • CTRL+SHIFT+C , then CTRL+N (for a new table), then CTRL+SHIFT+V  (simultaneous) keystrokes.
  • Table Subset can subset all rows and all columns Main Menu>Subset or using a script
  • current data table() << subset(All Rows, All Columns);

 

ms
Super User (Alumni) ms
Super User (Alumni)

Re: How do I implement this "Copy With Column Names" operation with JSL?

Main Menu() should work. But before execution the data table must be moved to the front. Otherwise, "copy with column names" is not available in the Edit Menu.

 

Try this! (works in JMP 14 for Mac, possibly in other versions too)

// Before running, select columns and rows of interest, or deselect all to copy the whole table to clipboard
Current Data Table() << Bring Window To Front;
Wait(0);
Main Menu("Copy With Column Names");

 

lwx228
Level VIII

Re: How do I implement this "Copy With Column Names" operation with JSL?

It worked, thank you!
lwx228
Level VIII

Re: How do I implement this "Copy With Column Names" operation with JSL?

Please give me the guidance again:

How to copy R square data table in this decision tree report in the form of Main Menu(), thank you!

 

2018-08-23_21-30-06.png

txnelson
Super User

Re: How do I implement this "Copy With Column Names" operation with JSL?

With luck, @ms may have a method using Main Menu().

However, the Copy Table option from a Table Box() is a universal option in JMP for any given table box in a report output.  And in many cases, there are multiple table boxes in a given display.  The method that I use to access a particular table box from a given report output from a JMP Platform, is to reference the Tree Structure table box that I need information from, and then sent it the message "<< Copy Data" (See Help==>Books==>Scripting Index==>Display Trees).  The JSL below illustrates that method

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\Boston Housing.jmp" );
pp = dt << Partition(
	Y( :mvalue ),
	X(
		:crim,
		:zn,
		:indus,
		:chas,
		:nox,
		:rooms,
		:age,
		:distance,
		:radial,
		:tax,
		:pt,
		:b,
		:lstat
	),
	Split Best( 3 )
);

Report( pp )[Table Box( 1 )] << copy data;
Jim
lwx228
Level VIII

Re: How do I implement this "Copy With Column Names" operation with JSL?

Yes, just like that. More efficient, thanks Jim!