Description
Required Arguments
column prefix
The prefix to add to the new columns names.
n
The number of columns to add.
Character
A new character column.
Numeric
A new numeric column.
Row State
A new row state column.
Optional Arguments
Before First
Adds the columns before the first column.
After Last
Adds the columns after the last column.
After(column)
Adds the columns after the specified column.
Field Width(n)
Specifies the width of the columns.
Notes
If you omit arguments, or the arguments are incorrectly specified, the Add Multiple Columns window appears.
See Also
Add Several Columns at Once in the Scripting Guide
Description
Notes
If you omit arguments, or the arguments are incorrectly specified, the Add Rows window appears.
See Also
Add Rows in the Scripting Guide
Adds the specified scripts to the data table.
Notes
Deselects all selected columns.
Description
Notes
If no arguments are specified, all locks are cleared.
Creates n new formula columns, substituting references to column1 with columns from the list into the formula from the original column.
Description
Required Argument
column
The column to color or mark.
Optional Named Arguments
Color(n)
Uses the specified JMP color.
Add Marker(Boolean)
Shows or hides the marker in the data table.
Color Theme(color theme)
Uses the specified quoted color theme.
Marker Theme(marker theme)
Uses the specified quoted marker theme: "Standard", "Hollow", "Paired", "Classic", or "Alphanumeric".
Continuous Scale|Continuous Scale(Boolean)
Assigns colors in a chromatic sequential fashion based on the values in the highlighted column.
Reverse Scale|Reverse
Reverses the color scheme in use.
Excluded Rows(Boolean)
If true, applies the row states to excluded columns.
"Make Window with Legend"
Creates a separate window with a legend.
Examples
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << Combine Columns(
Delimiter( "," ),
Columns(
:Brush After Waking Up,
:Brush After Meal,
:Brush Before Sleep,
:Brush Another Time
),
Column Name( "When to Brush" )
);
Compresses the listed columns into the most compact form that is possible. Columns with character data are compressed to 1 byte if there are fewer than 255 levels. Columns with numeric data are compressed to 1 byte if the integers are between -127 and 127.
Description
Returns
A reference to the concatenated data table.
Required Arguments
dt2|Data Table(name)|Multiple Data Table(name)
A data table reference or the names of the data table or data tables that you would like to combine.
Optional Arguments
"Private"
A quoted keyword that opens the data table without displaying it in a data table window.
"Invisible"
A quoted keyword that hides the data table. Use this argument to keep the data table hidden but use it in a subsequent expression. The data table is displayed in the Home Window’s Window List and the Window > Unhide list.
Output Table name(name)
The name of the final data table. If you do not enter a name, JMP names the data table Untitled # (for example, Untitled 1).
"Append to First Table"
Appends rows to the first data table reference or data table name in the first argument. This option is an alternative to creating a new data table.
"Keep Formulas"
Includes formulas in the final data table.
"Create Source Column"
Adds a column called Source Table to the new data table.
Notes
"Private" and "Invisible" only apply if not using "Append to First Table".
See Also
Vertically Concatenate Data Tables in the Scripting Guide
Example
dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
dt << Select Columns( :MODULUS, :ELONG );
dt << Copy Column Properties;
New Window( "Script", Script Box( "//Try paste here" ) );
or
dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
dt << Copy Column Properties( {:MODULUS, :ELONG} );
New Window( "Script", Script Box( "//Try paste here" ) );
Description
Example
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Properties( {"Distribution", "Oneway"} );
proplist = dt << Copy Selected Properties();
New Window( "Script", Script Box( "//Try pasting here" ) );
Copies the script to recreate the data table onto the clipboard so that it can be pasted somewhere else. Add the "No Data" argument to omit the data.
Description
Example
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Properties( {"Distribution", "Oneway"} );
proplist = dt << Copy Table Scripts();
New Window( "Script", Script Box( "//Try pasting here" ) );
Optional Arguments
Location(x, y)
Moves the data filter window to the specified location. x and y are measured in pixels. 0,0 is the top left of the monitor.
"Close Outline"
Closes the data filter outline.
"Local"
Enables the filter to be embedded in reports to filter one or more platforms without affecting other reports.
Inverse(Boolean)
Selects all but the specified rows for all filters.
Show Columns Selector(Boolean)
If true, a column list is shown that adds a new column to the filter.
Title(quoted string)
The title that is displayed on the outline.
Save and Restore Current Row States(Boolean)
Restores your current row states when the Data Filter window is closed.
Conditional(Boolean)
Limits the categories displayed for the selected filter column.
Auto Clear(Boolean)
If you have more than one nominal or ordinal column selected in the Data Filter, this option clears any other selections before making a new selection.
Group By AND(Boolean)
Enables you to create a filter group, specify OR, and add one or ore filters to create second filter group. If you specify Grouped By And, the behavior is reversed and grouped by AND instead.
Show Histograms and Bars(Boolean)
Shows or hides the histogram and bars in the data filter.
Count Excluded Rows(Boolean)
Shows or hides the number of excluded rows.
Mode
The three modes of filtering: Select(Boolean) shows or hides the selected rows in the data table in a highlighted state; Show(Boolean) shows or includes the unselected rows and shows the Hide icon; Include(Boolean) shows or includes the unselected rows and shows the Exclude icon.
The global data filter default is Select(), Show(0), and Include(0), The local data filter default is Show(1), Include(1), Select() is not a valid option.
Add Filter
Creates the data filter. Arguments include Columns(), Where(), Display(), Select Missing(cols), and Order By Count(cols). Columns() takes one or more column names separated by commas. You can add one or more Where clauses to define the filter.
Where
Defines a Where clause by which the data is filtered.
Display(column, size, display type)
Sets how the specified categorical column levels are displayed in the filter. The arguments are Blocks Display, List Display, Single Category Display, Check Box Display, Radio Box Display. In categorical columns, you can include the Find(Set Text(quoted string)) argument to include and initialize the search field. Display can also be included for a continuous column and can contain a size argument.
Select Missing Cols(cols)
Selects missing values in continuous columns.
Order by Count(cols)
For a categorical column, this option sorts the values in decreasing order by count.
Favorites
Saves the current data filter criteria as a favorite.
Animation
Cycles through the sorted values of the specified column, selecting and deselecting rows. Optional arguments include Animate Column(col), Animate Rate(number), and "Forward"|"Backward"|"Bounce"highlights values from first to last. "Backward" highlights values from last to first. "Bounce" highlights forward and then backward repeatedly.
See Also
Add a Data Filter in the Scripting Guide
The Data Filter in Using JMP
Description
Returns
A reference to the data view.
Optional Named Arguments
Excluded
The new data table includes only the rows that are marked as excluded in the original data table.
Labeled|Labelled
The new data table includes only the rows that are marked as labeled in the original data table.
Hidden
The new data table includes only the rows that are marked as hidden in the original data table.
Selected
The new data table includes only the rows that are selected in the original data table.
Description
See Also
Delete Columns in the Scripting Guide
Description
See Also
Delete Rows in the Scripting Guide
Description
Notes
In JMP versions prior to 14, use Delete Table Property to delete a table script.
Examples
dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" );
cols = dt1 << Get As Matrix(); // returns all numeric columns
Show( cols );
cols =
[ 12 59 95,
12 61 123,
12 55 74,...]
colnums = dt1 << Get As Matrix( {4, 5} ); // returns columns four and five
Show( colnums );
colnums = [ 59 95, 61 123, 55 74, 66 145, 52 64, 60 84, 61 128, ...]
dt2 = Open( "$SAMPLE_DATA/Probe.jmp" );
colrange = dt2 << Get As Matrix( 10::22); // returns columns 10 through 22
Show( colrange );
colrange =
[ -0.08818069845438 0.711340010166168 1.85904002189636 0.396923005580902 4.50656986236572 7.86504983901978 1.53891003131866 -2.76178002357483 0.0711032971739769 5.75577020645142 -3.62023997306824 -0.971698999404907 -0.0525696985423565, ...]
Returns the data table as a report. If rows and columns are selected in the data table, only those rows and columns are in the report.
Example
The following script returns Big Class.jmp as a report and displays it and a distribution in one window.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dtRpt = dt << Get As Report;
distRpt = V List Box(
dt << Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
)
);
New Window( "Example", H List Box( dtRpt, distRpt ) );
Description
Required Argument
quoted string
Returns a list of quoted strings rather than a list of column references.
Optional Arguments
modeling type
The quoted modeling type. The options are "Continuous", "Ordinal", "Nominal", "Multiple Response", "Unstructured Text", "None", and "Vector".
data type
The quoted data type. The options are "Numeric", "Character", "Row State", and "Expression".
Notes
The data types and the modeling types get only the specified types of columns. More than one of each type can be specified.
See Also
Get Column Names in the Scripting Guide
Returns the column references of the quoted strings in the list or matrix. If no list or matrix is used, JMP returns a list of references to all columns.
Returns the column display width in pixels.
Returns the rows that are excluded in the data table.
Returns the currently hidden rows in the data table.
Example
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( Y( :weight ), X( :height ) );
rbiv = biv << Report;
Print( rbiv << Get Journal );
Returns the currently labeled columns in the data table.
Example
In PopAgeGroup.jmp, the Country and Year columns are labeled. The following script returns a list of the labeled column names.
dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" );
dt << Get Labeled Columns;
{:Country, :Year}
Returns the currently labeled rows in the data table.
Returns the absolute path for the JMP data table. Note that this function is not for imported data that is not saved yet.
Returns the row ID display width in pixels.
Returns a vector containing the row state for every row in the data table or data filter.
Returns the rows in the data table that match the specified Where criteria. Here are some examples:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Get Rows Where( :sex == "M" );
dt << Get Rows Where( :sex == "M" & :age < 15 );
Description
See Also
Description
See Also
Description
See Also
Description
Optional Argument
list of properties
Specifies the properties to get.
Example
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Properties( {2, 4} );
proplist = dt << Get Selected Properties();
// returns the second and fourth table scripts and highlights them
// in the data table
Description
See Also
Description
See Also
Description
See Also
Description
Returns
A data table.
Required Arguments
With(Data Table(name))
Specifies the data table to join with the active table.
"Private"
Specifies a quoted keyword that opens the data table without displaying it in a data table window.
"Invisible"
Specifies a quoted keyword that hides the data table. Use this argument to keep the data table hidden but use it in a subsequent expression. The data table is displayed in the Home Window’s Window List and the Window > Unhide list.
Select(columns)
Selects the data table to join with the active table.
Select With(columns)
By Matching Columns(column1=column2)
Selects columns in both tables whose values and data types match.
"Cartesian"
Joins two tables using a Cartesian fashion, where it forms a new data table consisting of all possible combinations of the rows from two original data tables. JMP crosses the data in the first table with the data in the second to display all combinations of the values in each set.
"By Row Number"
Joins the two tables side by side.
"Merge Same Name Columns"
Data from the second table replaces the data of the same name columns in the original table. Note that missing values in the first table are replaced by nonmissing values in the second.
"Match Flag"
Determines whether the Match Flag column is created when you are matching by column.
Copy Formula(Boolean)
Includes formulas from the main table and/or the second table in the output columns.
Suppress Formula Evaluation(Boolean)
Prevents JMP from evaluating columns’ formulas during the creation of the new table.
"Update"
Column data from the second table change the data of the same name columns in the original table. The results are displayed in a new data table. Note the following: JMP does not replace data with missing values; the output table uses the same columns as the original table. Thus, when you use "Update", Select Columns, the "Update" option is available only when joining by row number or by matching columns.
Drop Multiples(Boolean, Boolean)
Specifies that you want the new table to contain only one row for each name. Applies only when matching by columns.
Include Non Matches(Boolean, Boolean)
Includes non-matching columns in the main table and new data table. Applies only when matching by columns.
"Preserve Main Table Order"
Maintains the order of the original data table in the joined table, instead of sorting by the matching columns.
Output Table Name(name)
Specifies the name of the joined table. If you do not specify a name, JMP names the data table Untitled # (for example, Untitled 1).
See Also
Join Data Tables in Using JMP
Makes a journal from the data table. Only the data grid is included, not notes, variables, or scripts.
Notes
– Journals that are created in JMP 14 or later might contain compressed matrix data for large matrices. If you have JSL scripts that open journals and extract data from them, you might need to use the Get Journal message (which does not compress the matrices) rather than saving the journal to disk with the Journal message.
See Also
See dt<<Get Journal
Create Journals in the Scripting Guide
Adds a link to the data table in the current journal. If a journal does not exist, a new one is created.
Optional Arguments
path
Specifies the quoted path where the table is saved. If omitted, the data table should already have a disk location (previously saved or loaded), otherwise the journal link is incomplete and will not reload the table.
Embed
Embeds a JSL script to recreate the data table.
Button Name(name)
Specifies the name that is displayed on the button. The name argument is quoted. If the button name is not specified, the button is named after the data table.
Returns the date on which the data table was last saved.
Layout is deprecated and will be removed in a future release. Use Journal instead.
Description
Locks the data table so that data and column properties cannot be added or changed.
See Also
Example
The following example creates indicator columns for the sex column. Append Column Name creates columns named sex_F and sex_M. Otherwise, the columns are named after each level (F and M). Include Missing includes missing values.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Make Indicator Columns(
Columns( :sex ),
Append Column Name( 1 ),
Include Missing( 1 )
);
Creates a row state handler function. The argument of the function holds the rows whose row states get changed.
Returns the data table as a SAS Data Step.
Returns the data table as a SAS Data Step and places it in a SAS script window.
Description
See Also
Description
See Also
Description
Example
The following example moves the age column to the last column in Big Class.jmp:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Go To( :age );
dt << Move Selected Columns( "To Last" );
You may also use a list to specify the column names.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
list = {"name", "sex"};
dt << Move Selected Columns( list, "To Last" );
Description
Adds a new column titled with the quoted name after the last column in dt. Unless otherwise specified, columns are numeric, continuous, and 12 characters wide.
Returns
A column reference.
Required Argument
name
The name of the new column.
Optional Arguments
data type
A quoted string that specifies the data type. The options are "Numeric", "Character", "Row State", or "Expression".
modeling type
A quoted string that describes the modeling type ("Continuous", "Nominal", "Ordinal", "Multiple Response", "Unstructured Text", "None", or "Vector").
Format(format, width)>
Sets the format type and column width.
Set Values({})
Specifies the data in the column.
Formula
Specifies the column formula.
Set Property(properties)
Specifies any messages that data table columns support. Action arguments are found in the Column Properties menu in the New Column window. Axis and Link Reference are action argument.
See Also
For examples of setting other numeric format properties, see col<<Format(<width>, <decimal places>, <"Use Thousands Separator">).
Create Columns in the Scripting Guide
Data Type, Modeling Type, Numeric Format Options, and Column Properties in JMP in Using JMP
Example
dtA = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp", invisible );
nw = New Window( "Example",
H List Box(
V List Box( dtbox = dtA << New Data Box() ),
dtA << Distribution(
Continuous Distribution( Column( :NPN1 ) ),
Continuous Distribution( Column( :PNP1 ) )
)
)
);
dtbox << Set Stretch( "Off", "Off" ) << Set Width( 800 );
Opens a duplicate of the data table. The second data table is identical to and linked to the original data table, so that any changes made in one are reflected in the other. Closing either data table also closes the other and all references to the data tables are deleted.
This can be useful to show an invisible data table.
Example
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Set Property( "Bivariate Example", Bivariate( Y( :weight ), X( :height ), Fit Line ) );
Example
dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
dt << Copy Column Properties( {:MODULUS, :ELONG} );
dt2 = New Table( "test it",
New Column( "T1", numeric, continuous ),
New Column( "T2", numeric, continuous ),
New Column( "T3", numeric, continuous ),
Add Rows( 10 )
);
dt2 << Paste Column Properties( {:T1, :T3} );
// pastes the column properties from MODULUS and ELONG to T1 and T3
Description
Used to identify strong predictors.
Example
dt = Open( "$SAMPLE_DATA/Boston Housing.jmp" );
obj = dt << Predictor Screening(
Y( :mvalue ),
X( :crim, :indus, :chas, :nox, :rooms, :age, :distance, :radial )
);
Description
Example
dt << Rename Script Group( "Maps", "Street Maps" );
Description
Required Argument
Select Where(condition)
Specifies the condition by which the rows are selected.
Optional Arguments
current selection("Extend"|"Restrict"|"Clear")
Extends, restricts, or clears the existing selections. Clear is the default value.
Dialog("Keep Dialog Open")
Shows the dialog so that the user can edit the options.
Description
See Also
Saves the data table to the database named using the quoted connection information and quoted table name. The "Replace" option replaces the existing database with the current database.
Description
Selects the second and subsequent duplicate rows. If columns are selected, duplicate values are found in the rows of those columns. The duplicate values are case sensitive.
See Also
Select Duplicate Rows in the Scripting Guide
Description
See Also
Select Where in the Scripting Guide
Marks the data table as changed, even if no changes have been made.
Description
See Also
Assigns the specified columns as label columns.
Description
Returns
The data table name as a quoted string.
Notes
A change was made to the Set Name message so that now the new table name is returned as a quoted string. In previous releases, Set Name returned a scriptable data table object. As a result of this change, JMP scripts might need to be updated for the desired result to be returned. For example, rewrite the following script:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" ) << Set Name( "Test" );
Separate the messages so that dt represents the data table instead of “Test”:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Set Name( "Test" );
The result is the same as in previous releases but will run successfully in both earlier and newer versions of JMP.
Sets the row ID display width to the specified number of pixels. If n is set to zero, the row ID display width automatically resizes.
Description
Returns
A reference to the sorted table.
See Also
See Sort a Data Table in the Scripting Guide
See Sort Data Tables in Using JMP
Description
Returns
A reference to the split data table.
Required Arguments
Split(columns)
The column to split.
Split By(column)
The column to split by.
Optional Arguments
Group
Splits data within the specified groups.
Remaining Columns("Keep All"|"Drop All"| Keep(columns)|Drop(columns))
Specifies what to do with the remaining columns in the resulting table. Keep All is the default setting.
Note: Keep All includes all columns in the output data table. However, the values of every column are not included. Because multiple rows are collapsed to a single row in the output data table, some values of the kept columns are dropped.
Copy Formula(Boolean)
Includes column formulas from the source table in the resulting table.
Suppress Formula Evaluation(Boolean)
Stops any copied formulas from being evaluated. True is the default setting.
Sort by Column Property
Sorts the order of the output columns by the sort column property that is defined for the Split by column.
Output Table(name)
Generates the output to the specified table name.
See Also
Split Values in a Stacked Data Table in the Scripting Guide
Split Columns in Using JMP
Description
Returns
A reference to the stacked data table.
See Also
Stack Values in a Data Table in the Scripting Guide
Stack Columns in Using JMP
Description
Subscribes to a data table to get messages regarding changes in the data table.
Returns
The keyname.
Arguments
"keyname"(<client>)
Specifies the subscription name so that it can be referenced. The quoted client triggers a close confirmation when a close is attempted on the data table, warning that other open windows depend on the data table.
On Delete Columns(<function>|<script>)
Returns the keyname when columns are deleted.
On Add Columns(<function>|<script>)
Returns the keyname when columns are added.
On Add Rows(<function>|<script>)
Returns the keyname when rows are added.
On Delete Rows(<function>|<script>)
Returns the keyname when rows are deleted.
On Rename Column(<function>|<script>)
Returns the keyname when columns are renamed.
On Close(<function>|<script>)
Returns the keyname when the data table is closed. Takes one argument, a function. The function requires only one argument, the data table name.
On Save(<function>|<script>)
Returns the keyname when the data table is saved.
On Rename(<function>|<script>)
Returns the keyname when a rename is attempted on the data table. The function can be either the name of a previously defined function or the function itself.
Notes
Each subscription option remains in effect until you unsubscribe.
See Also
Subscribe to a Data Table in the Scripting Guide
Description
Returns
A reference to the subset data table.
See Also
Subset a Data Table in the Scripting Guide
Create a Subset Data Table in Using JMP
Description
Returns
A reference to the summary data table.
See Also
Create a Summary Table in the Scripting Guide
Summarize Your Data in Using JMP
Example
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << Text To Columns(
delimiter( "," ),
columns( :Brush Delimited )
);
Description
Returns
A reference to the transposed data table.
Description
See Also
Releases any previous subscriptions to the data table dt. The keyname argument is quoted.