Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar

automatically write "Source" script when "Make Combined Data Table" is used in report with By column

Based on details in the discussion below, this idea is amended to request that a "Source" or "Make Combined Data Table" script be written to the table resulting from Make Combined Data Table in a report when there is a By column/variable.

 

---------------------------------------------

 

"Make Combined Data Table" is one of JMP's most powerful features, yet one of its most challenging to script. No matter how many times I use this feature when exploring my data, I nearly always fail repeatedly when I try to incorporate it into a longer JMP-scripted data analytical pipeline. (I suspect I'm not the only one who has pinged support@jmp.com repeatedly on this same issue.)

 

When users run any of the platforms accessible from the Table menu the table that gets created is automatically created with a "Source" script that can be copied and pasted into a larger script in such a way that only minor and relatively obvious tweaking is needed to get the table script working in its new context. Yet when users request "Make Combined Data Table", usually no source script gets written automatically to the newly created table. This seems like a glaring and important gap in JMP's feature set that I hope can be filled with the next release.

 

Intriguingly, when users request "Make Combined Data Table" for a report table that occurs only once within the report, a script called "Make Combined Data Table" is in fact saved to the data table. But it is relatively non-obvious (to me) what kind of tweaking is needed to adapt the saved script to the situation where there are actually multiple tables that I very much need to combine.

 

I suspect there are many of us who would benefit if a functioning "Source" script were automatically saved to the newly created table every time "Make Combined Data Table" is requested -- especially when there are actually multiple tables to combine.

Tracking Number:

Defect ID: S0877468

9 Comments
Community Manager

Make Combined Table does create a "Make Combined Table" script in the resulting table, as long as you don't have a By variable in your analysis. The By variable makes it more difficult for JMP to know how to build the script. I assume you're wishing for support in the By variable case. Can you confirm?

Level III

Interesting! I hadn't figured out that the "By" variable was treated as an exception this way... probably because I am (almost) *always* using a By variable when I try to "Make Combined Data Table".

 

Yes, please extend this feature to provide support for the By variable.

 

Thx, Jeff!

tom

Community Manager
Status changed to: In Development

In that case, I'm happy to say that JMP 15 will provide a "Make Combined Data Table" script when there is a By column. 

Level III
Excellent!!
Community Manager
Status changed to: Delivered

JMP 15 now handles By groups properly when using Make Combined Data Table.

Level III
fantastic! Thank you!
Level II

Hi, will it also work when Where statement is used? 

Community Manager

@derchieh, can you give an example of what you're looking for? How is the where statement used in your code?

Level II

Hi Jeff,

 

I frequently use Fit Model with Where statement as follows:

 

dt = Open( "$SAMPLE_DATA/Analgesics.jmp" );
Summarize( dt, genlst = by( :gender ) ); New Window( "Fit Model example using Analgesics.jmp", For( i = 1, i <= N Items( genlst ), i++, fm = Fit Model( Y( :pain ), Effects( :drug ), Personality( "Standard Least Squares" ), Emphasis( "Minimal Report" ), Run( :pain << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ), Lack of Fit( 0 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 0 ), Plot Regression( 0 ), Plot Residual by Predicted( 0 ), Plot Studentized Residuals( 0 ), Plot Effect Leverage( 0 ), Plot Residual by Normal Quantiles( 0 ), Box Cox Y Transformation( 0 ), {:drug << {LSMeans Tukey HSD( 0.05, Crosstab Report( 0 ), Connecting Letters Report( 0 ), Ordered Differences Report( 1 ) )}}} ), Where( Format( :gender ) == genlst[i] ), SendToReport( Dispatch( {"Response pain"}, "Effect Details", OutlineBox, {Close( 0 )} ) ); ) ) ); rfm = fm << Report; rfm[Outline Box( "LSMeans Differences Tukey HSD" )][4][1] << Make Combined Data Table;

 

I usually do 

rfm[Outline Box( "LSMeans Differences Tukey HSD" )][4][1] << Make Combined Data Table;

manually by right click on the table on the report and select Make Combined Data Table. The resultant data table follows the format as below

 
 
 

image.png

The values from the Where statement are not included in this combined data table. I then create new columns to fill in the missing information. Luckily, the ordering of the results is the same as the reports.

 

I don't know if this is the same issue or a separate problem that can be resolved with advanced scripting skills.

 

Derchieh