Contains
Contains using Window
Summary: Process of opening a private data table, retrieving its name, and checking if it matches a window title.
Code:
dt = Open( "$SAMPLE_DATA/data_table.jmp", private );
thisTitle = dt << Get Name;
testWins = Window() << Get Window Title;
testThisWin = Contains( testWins, thisTitle );
Code Explanation:
- Open data table;
- Set dataset to private.
- Retrieve dataset name.
- Get all window titles.
- Check if dataset title is in window titles.
Contains using Try
Summary: Process of opening a private data table, retrieving its name, and checking if it matches the current window title.
Code:
dt = Open( "$SAMPLE_DATA/data_table.jmp", "private" );
thisTitle = dt << Get Name;
testWins = Try( Get Window List() << Get Window Title, Window() << Get Window Title );
testThisWin = Contains( testWins, thisTitle );
Code Explanation:
- Open data table;
- Set dataset to private.
- Retrieve dataset name.
- Get list of window titles.
- Handle potential errors in getting window titles.
- Attempt to get current window title.
- Check if dataset name is in window titles list.
- Assign result to testThisWin variable.
Contains using If
Summary: Executes a Structural Equation Modeling (SEM) script in JMP Pro, configuring path diagram properties to hide covariances, equality constraints, and loadings while showing means and variances.
Code:
If( Contains( JMP Product Name(), "Pro" ),
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Run Script( "SEM: Bollen (1989)" );
obj << Path Diagram Properties( Show Covariances( 0 ) );
obj << Path Diagram Properties( Show Equality Constraints( 0 ) );
obj << Path Diagram Properties( Show Estimates( "None" ) );
obj << Path Diagram Properties( Show Loadings( 0 ) );
obj << Path Diagram Properties( Show Means( 1 ) );
obj << Path Diagram Properties( Show Regressions( 0 ) );
obj << Path Diagram Properties( Show Variances( 0 ) );
);
Code Explanation:
- Check if JMP Pro is installed.
- Set default name scope.
- Open data table.
- Run SEM script.
- Hide covariances in path diagram.
- Hide equality constraints.
- Set estimate display to none.
- Hide loadings.
- Show means.
- Hide regressions.
- Hide variances.