Subscribe Bookmark RSS Feed

How to choose/activate open but not saved data tables back and forth

saitcopuroglu

Community Trekker

Joined:

Sep 29, 2014

During automated report script I create many summary tables which I don't save. Since the last created table is active and any -let's say Graph Builder- graph will be produced from the last produced active table, how do I activate/choose an inactive but open data table?

A simple example is:

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

dt2 = Open(

  "$SAMPLE_DATA/Fitness.jmp",

  Select Columns( "Name", "Sex", "Age", "Weight" )

);

Graph Builder(

  Title Fill Color( "Light Blue" ),

  Title Frame Color( "Medium Dark Gray" ),

  Level Fill Color( {174, 203, 228} ),

  Level Frame Color( "Medium Dark Gray" ),

  Level Underline( 1 ),

  Variables( X( :Sex ), Y( :Weight ) ),

  Elements(

  Bar(

  X,

  Y,

  Legend( 2 ),

  Bar Style( "Side by side" ),

  Summary Statistic( "Mean" ),

  Label( "Value" )

  )

  )

);


I would like to keep graphing but with the Big Class Data Table where the Fitness data table is active/chosen...


Thank you in advance for your help

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

dt1<<graph builder(...)

if you don't specify a table, the "current" table is used.  You should always specify a table since the current table changes when you click on a different table or open another table.

<< is the operator to send a message to an object.  A data table is an object, and it understands messages that look like launching platforms.

Craige
2 REPLIES
Solution

dt1<<graph builder(...)

if you don't specify a table, the "current" table is used.  You should always specify a table since the current table changes when you click on a different table or open another table.

<< is the operator to send a message to an object.  A data table is an object, and it understands messages that look like launching platforms.

Craige
pmroz

Super User

Joined:

Jun 23, 2011

You can also explicitly set the current data table using current data table(tbl_variable):

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

dt2 = Open(

     "$SAMPLE_DATA/Fitness.jmp",

     Select Columns( "Name", "Sex", "Age", "Weight" )

);

current data table(dt1);

Graph Builder(

     Title Fill Color( "Light Blue" ),

     Title Frame Color( "Medium Dark Gray" ),

     Level Fill Color( {174, 203, 228} ),

     Level Frame Color( "Medium Dark Gray" ),

     Level Underline( 1 ),

     Variables( X( :Sex ), Y( :Weight ) ),

     Elements(

           Bar(

                X,

                Y,

                Legend( 2 ),

                Bar Style( "Side by side" ),

                Summary Statistic( "Mean" ),

                Label( "Value" )

           )

     )

);