For the latest version of JMP Help, visit JMP.com/help.


Publication date: 04/30/2021

Data Tables

dt<<Add Column Properties(property argument, ...)

Adds the specified properties (such as Value Order and Missing Value Codes) to the selected column.

dt<<Add Multiple Columns(column prefix, n, <"Before First"|"After Last"|After(column)>, "Character"|"Numeric"|"Row State", <Field Width(n)>)

Description

Adds n columns to dt at the position indicated.

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 Add Several Columns at Once in the Scripting Guide for examples.

dt<<Add Rows(<n>, <"At Start"|"At End"|After(row number)>|{column name=value pairs})

Description

Adds rows at the start, at the end, or after a specified row in the data table. The message can also add rows based on the specified column name and value pairs. Those rows are added to the end of the data table.

Notes

If you omit arguments, or the arguments are incorrectly specified, the Add Rows window appears.

See Add Rows in the Scripting Guide for examples.

dt<<Add Scripts to Table(script, ...)

dt<<Add Properties to Table(script, ...)

Adds the specified scripts to the data table.

dt<<Anonymize(<Columns(column list(s))>, <Output Table Name(name)>);

Removes unique identifiers from data, some column properties, and table scripts. Applies to a data table or the specified list of columns. The new data table has the name that is specified by the quoted name argument.

dt<<Begin Data Update

Holds off display updating to allow for quick updating of data table cells. Use End Data Update in conjunction with this command to turn display updating back on.

Notes

Begin Data Update does not affect the data refresh due to some other table manipulations. For example, when you delete or add columns, the data table is updated and then the data update begins.

dt<<Clear Column Selection

Deselects all selected columns.

dt<<Clear Edit Lock(<"Modify Cells">, <"Add Rows">, <"Add Columns">, <"Delete Rows">, <"Delete Columns">)

Description

Allows the specified data table operation again.

Note

If no arguments are specified, all locks are cleared.

dt<<Clear Row States

Cancels any row states in effect.

dt<<Clear Select

Turns off the current selection.

dt<<Clone Formula Column(column, n, Substitute Column Reference(column1, {list}))

Creates n new formula columns, substituting references to column1 with columns from the list into the formula from the original column.

dt<<Close Data Grid(Boolean)

If true, closes the data table grid.

dt<<Close Side Panels(Boolean)

If true, closes the side panel in a data table.

dt<<Color or Mark by Column(column, <named arguments>)

dt<<Color by Column(column, <named arguments>)

dt<<Marker By Column(column, <named arguments> );

Description

Assigns colors or markers according to the values of a data table column. If no optional arguments are provided, colors are assigned according to the default color theme.

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.

dt<<Color Rows by Row State

Colors the rows in the data table grid using the color assignments by row states. Send the message again to turn off the row colors.

dt<<Combine Columns(Delimiter("delim"), Columns(column1, column2, etc.), Column Name(string))

Combines several columns into a single column. Each source columns’ values are separated by the delimiter specified as the quoted delim argument.

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" )
);

dt<<Compress File When Saved(Boolean)

Compresses the file when the data table is saved.

dt<<Compress Selected Columns({column1, ...})

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 numeric values are between -127 and 127.

dt<<Concatenate(dt2|Data Table(name)|Multiple Data Table(name) arguments, (<"Private"|"Invisible">), <Output Table Name(name)>|"Append to First Table">, <"Keep Formulas">, <"Create Source Column">)

Description

Creates a new table (name) from the rows of dt and dt2. By default, Concatenate creates a new data table and appends the rows of each data table that is specified.

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 Vertically Concatenate Data Tables in the Scripting Guide for examples.

dt<<Copy Column Properties

Copies all of the column properties for the selected columns into a list of separate lists of properties. Optionally, you can specify a list of source columns instead of preselecting them in the data table.

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" ) );

dt<<Copy Selected Properties

Copies the selected table properties to the clipboard.

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" ) );

dt<<Copy Table Script("No Data")

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.

dt<<Copy Table Scripts

dt<<Copy Selected Properties

Description

Copies the selected scripts to the clipboard.

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" ) );

dt<<Data Filter(<Location(x, y), <"Close Outline">, <"Local">, <Inverse(Boolean)>, <Show Columns Selector(Boolean)>, <Title(string)>, <Save and Restore Current Row States(Boolean)>, <Conditional(Boolean)>, <Auto Clear(Boolean)>, <Group By AND(Boolean)>, <Show Histograms and Bars(Boolean)>, <Count Excluded Rows(Boolean)>, <Mode(...)>, <Add Filter((cols(...), <Where(...)>, <Display(...)>, <Select Missing(cols)>, <Order By Count(cols)>)>, <Favorites(...)>, <Animation(...)>)

Constructs a data filter. If no arguments are specified, the Add Filter Columns window appears.

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(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(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 continuous columns that contain missing values.

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 Add a Data Filter in the Scripting Guide and The Data Filter in Using JMP.

dt<<Get Header Height

Returns the column header’s display height (in pixels).

dt<<Data View(<named arguments>)

Description

Duplicates the data table in a new window. If you specify one of the following quoted arguments, the new data table includes only the corresponding rows.

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.

dt<<Delete Columns(column1, column2, ...)

dt<<Delete Column

Description

Deletes one or more columns from the data table dt. Specify which column or columns to delete. Without an argument, deletes the selected columns, if any.

Note

See Delete Columns in the Scripting Guide for examples.

dt<<Delete Rows(<n>)

dt<<Delete Rows({n, o, p, ...})

dt<<Delete Rows({n::q})

dt<<Delete Rows([n, o, p])

dt<<Delete Row(preceding arguments)

Description

Deletes the currently selected rows or rows specified. Returns the number of rows that were deleted.

Note

See Delete Rows in the Scripting Guide for examples.

dt<<Delete Scripts(table script name|{table script1, table script2, ...})

Description

Deletes the specified data table script or scripts with the quoted name or names, or deletes a list of data table scripts.

Note

In JMP versions prior to 14, use Delete Property to delete a table script.

dt<<Delete Table Property(name|{property1, property2, ...})

Deletes a table property (for example, a script or variable) with the quoted name.

dt<<Delete Table Variable(name)

Deletes a table variable with the quoted name.

dt<<Disable Undo(Boolean)

If true, disables undo operations in the data table.

dt<<End Data Update

Resumes display updating after a Begin Data Update message. These commands are used for quick updates of the data table when many changes have to be made. Speed is gained by turning off display updating.

dt<<Exclude

dt<<Unexclude

Toggles selected rows in dt from excluded to unexcluded or vice versa.

dt<<Get All Columns As Matrix

Returns the values from all columns of dt in a matrix. Character columns are numbered according to the levels, starting at 1.

dt<<Get As Matrix(<{list of columns by name}>|<{list of columns by number}>, <column range>)

Returns values from the numeric columns of dt in a matrix. The default output is all numeric columns.

Examples

dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" );
cols = dt1 << Get As Matrix(); // returns all numeric columns
Show( colnames );

colnames =

[ 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, ...]

dt<<Get As Report

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 ) );

dt<<Get Cell Height

Returns the data table cell height in pixels.

dt<<Get Column Names("String", <modeling type>, <data type>)

Description

Returns a list of column names in a data table. The quoted string returns a list of strings rather than a list of column references.

Optional Arguments

"String"

Returns a list of strings rather than a list of column references.

modeling type

Specifies the modeling type. The options are "Continuous", "Ordinal", "Nominal", "Multiple Response", "Unstructured Text", "None," and "Vector".

data type

Specifies the 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 Get Column Names in the Scripting Guide for examples.

dt<<Get Column Reference({list of column names}|[matrix of column numbers])

dt<<Get Column References({list of column names}|[matrix of column numbers])

Returns the column references of the strings in the list or matrix. If no list or matrix is used, JMP returns all column names.

dt<<Get Display Width

Returns the column display width in pixels.

dt<<Get Edit Lock

Returns the disallowed operations on the data table (if cells cannot be edited; rows cannot be added or deleted; and columns cannot be added or deleted).

dt<<Get Excluded Columns

Returns the currently excluded columns in the data table.

dt<<Get Excluded Rows

Returns the rows that are excluded in the data table.

dt<<Get Hidden Columns

Returns the columns that are hidden in the data table.

dt<<Get Hidden Rows

Returns the currently hidden rows in the data table.

dt<<Get Journal

Returns a string that contains journal source for the display box.

Example

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( Y( :weight ), X( :height ) );
rbiv = biv << Report;
Print( rbiv << Get Journal );

dt<<Get Label Columns

dt<<Get Labeled Columns

dt<<Get Labelled Columns

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}

dt<<Get Labeled Rows

dt<<Get Labelled Rows

Returns the currently labeled rows in the data table.

dt<<Get Name

Returns the name of the data table.

dt<<Get Path

Returns the absolute path for the JMP data table. Note that this function is not for imported data that is not saved yet.

dt<<Get Property(name)

Returns the script from the quoted property name.

dt<<Get Row Change Function

Returns the expression that is evaluated when a row is selected.

dt<<Get Row ID Width

Returns the row ID display width in pixels.

dt<<Get Row States

Returns a vector containing the row state for every row in the data table or data filter.

dt<<Get Rows Where(where clause)

Returns the rows in the data table that match the specified Where criteria. Some examples are as follows:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Get Rows Where( :sex == "M" );
dt << Get Rows Where( :sex == "M" & :age < 15 );

dt<<Get Script(<script name>)

Returns the script specified by the quoted script name. If the script name is omitted, Get Script returns a text representation of the data table and all scripts in the table.

dt<<Get Script Group(<group name>)

Description

Returns the list of table scripts in the quoted group name. If no group name is specified, a list of all table scripts in all groups is returned.

Note

See Get Groups and Group Names in the Scripting Guide for examples.

dt<<Get Script Group Names

Description

Returns the list of names of table script groups.

Note

See Get Groups and Group Names in the Scripting Guide for examples.

dt<<Get Scroll Locked Columns

Returns a list of columns that are locked from scrolling.

dt<<Get Selected Columns(<"String">)

Description

Returns a list of selected columns as column references. Include the quoted String argument to return the selected column names as a list of strings in a string.

Note

See Get Selected Columns in the Scripting Guide for examples.

dt<<Get Selected Properties(<{list of properties}>)

Description

Returns the selected table properties in a list.

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

dt<<Get Selected Rows()

Returns the selected rows.

dt<<Get Table Script Names()

Returns a list of the names of all the scripts and properties in the data table.

dt<<Get Table Variable(name)

Returns the value of the quoted name variable.

dt<<Get Table Variable Names

Returns a list of the names of all the variables in the data table.

dt<<Go To Row(n)

Locates and selects row number n in dt.

dt<<Group Columns({column1, column2, ...})

dt<<Group Columns(group name, column, n)

dt<<Group Columns(first column, n)

Description

Groups the columns under the specified quoted group name. You can provide either a list of columns to group, or a column name and the number of columns to group. In the latter case, the number n specifies to group the column given with the n-1 columns that follow.

Note

See Group Columns in the Scripting Guide for examples.

dt<<Group Scripts({script1, script2, ...})

Description

Groups a list of table scripts in the data table.

Note

See Work with Groups of Table Scripts in the Scripting Guide for examples.

dt<<Hide

dt<<Unhide

Toggles selected rows in dt from hidden to unhidden or vice versa.

dt<<Hide and Exclude

Hides the selected rows from graphs and excludes them from contributing to calculations.

dt<<Invert Column Selection(<{list of columns}>)

Selects any column that is currently deselected and deselects any column that is currently selected. If the list of columns is specified, the columns that are not in the list are selected. See Invert Column Selections in the Scripting Guide for examples.

dt<<Invert Row Selection

Selects any row that is currently deselected and deselects any row currently selected.

dt<<Is Dirty

Returns 1 if the table has been modified from its saved state. Otherwise, returns 0.

dt<<Join(With(Data Table(name)), (<"Private">|<"Invisible">), Select(columns), Select With(columns), (By Matching Columns(column1=column2, ...)|"Cartesian"|"By Row Number"), <"Merge Same Name Columns">, <"Match Flag">, <Copy Formula(Boolean)>, <Suppress Formula Evaluation(Boolean)>, <"Update">, <Drop Multiples(Boolean, Boolean)>, <Include Non Matches(Boolean, Boolean)>, <"Preserve Main Table Order">, <Output Table Name(name))>

Description

Combines data tables dt and Data Table side to side.

Returns

A data table.

Required Arguments

With(Data Table(name))

specifies the data table to join with the active table.

"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.

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).

Note

See Join Data Tables in Using JMP for more information.

dt<<Journal

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 dt<<Get Journal for an example.

See “Create Journals” in the Scripting Guide for examples.

dt<<Journal Link(<Save(<path>)|Embed()>, <Button Name(<name>)>))

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.

dt<<Label

dt<<Unlabel

Toggles selected rows in dt from labeled to unlabeled or vice versa.

dt<<Last Modified

Returns the date on which the data table was last saved.

dt<<Layout

Layout is deprecated and will be removed in a future release. Use Journal instead.

dt<<Lock Data Table

Locks the data table so that data and column properties cannot be added or changed. See dt <<Set Edit Lock(<"Modify Cells">, <"Add Rows">, <"Add Columns">, <"Delete Rows">, <"Delete Columns">) for more information about locking specific components of a data table.

dt<<Make Indicator Columns(<Append Column Name(Boolean)>, <Include Missing(Boolean)>)

Creates indicator columns of 0 and 1 values for the specified categorical columns.

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 )
);

dt<<Make RowState Handler

Creates a row state handler function. The argument of the function holds the rows whose row states get changed.

dt<<Make SAS Data Step

Returns the data table as a SAS Data Step.

dt<<Make SAS Data Step Window

Returns the data table as a SAS Data Step and places it in a SAS script window.

dt<<Make Validation Column

Creates a column that is used to divide the data into training and validation sets.

dt<<Marker by Column(column)

Assigns markers according to the values of the specified data table column. See dt<<Marker By Column(column, <named arguments> ); for details.

dt<<Markers(n)

Assigns marker n to the selected rows.

dt<<Maximize Display

Deprecated. Use Optimize Display instead.

Forces the data table to remeasure all of its columns and zoom to the best-sized window.

dt<<Move Script Group(group name, "To First"|"To Last"|After(table script name)|After(group))

Rearranges the table script groups specified by the quoted group. Grouped by the quoted group name. See Move a Script Group in the Scripting Guide for examples.

dt<<Move Selected Column(name(s), "To First"|"To Last"|After(name))

dt<<Move Selected Columns(name(s), "To First"|To Last"|After(name))

Description

Moves the selected column or columns in the data table to the specified position. The name argument is quoted.

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 );

dt<<Move Rows("At Start"|"At End"|After(n))

Moves the selected rows in the data table to the specified position. n represents a row number.

dt<<New Column(name, <data type>, <modeling type>, <Format(format, width)>, <Formula()>, <Set Values({..., ..., })>, <Set Property(properties)>)

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. See col<<Format(<width>, <decimal places>, <"Use Thousands Separator">) for examples of setting other numeric format properties.

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

Create Columns in the Scripting Guide

Data Type, Modeling Type, Numeric Format Options, and Column Properties in Using JMP.

dt<<New Data Box()

Makes a data table view in a display box tree. Useful for displaying the data table and report in one window. A data browser box is created when you send the New Data Box message to the data table object.

Example

The following script creates a data table view and report in one window. The data table is placed in a data browser box. The width of that box is set to 800 pixels. Because auto stretch is turned off, the data table view remains 800 pixels wide even if you stretch the right border of the window.

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 Auto Stretching( 0, 0 ) << Set Width( 800 );

dt<<New Data View

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.

dt<<New Script(name, script)

dt<<Set Property(name, script)

Creates a new table property (also called a table script) using the quoted name that stores the specified script.

Use New Script() or Set Property() rather than the deprecated New Property() and New Table Property().

Example

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Set Property( "Bivariate Example", Bivariate( Y( :weight ), X( :height ), Fit Line ) );

dt<<New Table Variable(name, number)

dt<<Set Table Variable(name, number)

Creates a new table variable with the quoted name and the number.

dt<<Next Selected

Scrolls data table down to show the next selected row that is not already in view.

dt<<Optimize Display

Forces the data table to remeasure all of its columns and zoom to the best-sized window.

dt<<Original Order

Restores saved order of columns in dt.

dt<<Paste Column Properties

Pastes multiple lists of column properties to multiple columns. Optionally, you can specify a list of target columns instead of selecting them in the data table.

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

dt<<Predictor Screening

dt<<Screen Predictors

Description

Used to identify strong predictors.

Example

dt = Open( "$SAMPLE_DATA/Boston Housing.jmp" );
obj = dt << Predictor Screening(
	Y( :chas ),
	X( :crim, :indus, :nox, :rooms, :age, :distance, :radial )
);

dt<<Previous Selected

Scrolls data table up to show the previous selected row that is not already in view.

dt<<Print Window(<"Show Dialog">)

Prints the window. If the optional named argument "Show Dialog" is specified, the print window is displayed. Otherwise, the window is printed to the default printer using the current settings, and no print window is displayed.

dt<<Rename Script Group(old name, new name)

Description

Renames the table script group.

Example

dt << Rename Script Group( "Maps", "Street Maps" );

dt<<Reorder By Data Type

Reorders columns in dt, row state first, then character, then numeric.

dt<<Reorder By Modeling Type

Reorders columns in dt to continuous, then ordinal, then nominal.

dt<<Reorder By Name

Reorders columns in dt to alphanumeric order by name.

dt<<Rerun Formulas

Recalculates all formula-based data table variables. Recalculations are performed in the proper dependency order.

dt<<Reverse Order

Reverses columns in dt from current order.

dt<<Revert

Reverts to the most recently saved version of dt.

dt<<Row Selection(Select Where(condition), <current selection("Extend"|"Restrict"|"Clear")> <Dialog("Keep Dialog Open")

Description

Selects all rows that meet the specified condition.

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.

dt<<Run Formulas

Performs all pending formula evaluations, including evaluations that are pending as a result of evaluating other formulas.

dt<<Run Script(name)

Finds the table property with the quoted name and runs it as a JSL script.

dt<<Save(path)

dt<<Save As(path)

Description

Saves the table in the specified quoted path.

Note

For information about supported formats, see Save and Share Data in Using JMP.

dt<<Save Database(connection information, table name, <"Replace">)

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.

dt<<Save Script to Script Window

Saves a script to reproduce the data table in a script editor window. Appends the script to any script that currently appears in the script editor.

dt<<Select All Rows

Selects all rows in the data table.

dt<<Select Columns(<column1>, <column2>,...|"All")

Selects the specified columns (or all columns) in the data table.

dt<<Select Duplicate Rows

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 Select Duplicate Rows in the Scripting Guide for examples.

dt<<Select Excluded

Selects only those rows in the data table that are currently excluded.

dt<<Select Hidden

Selects only those rows in the data table that are currently hidden.

dt<<Select Labeled

Selects only those rows in the data table that are currently labeled.

dt<<Select Randomly(p|n)

Randomly selects the given percentage p of the rows in the data table, or the number of rows n.

dt<<Select Rows([row1, row2, ...])

Selects the rows given in the list of row numbers.

dt<<Select Script Group(<group name|{group1, group2, ...}>)

Selects the table script group specified as a quoted group name or a list of quoted strings. If no argument is provided, all groups are selected.

dt<<Select Where(condition, <Current Selection("Extend"|"Restrict"|"Clear")>)

Description

Selects the rows in dt where the condition evaluates as true.

Note

See Select Where in the Scripting Guide for examples.

dt<<Set Dirty(Boolean)

Marks the data table as changed, even if no changes have been made.

dt <<Set Edit Lock(<"Modify Cells">, <"Add Rows">, <"Add Columns">, <"Delete Rows">, <"Delete Columns">)

Prevents cells from being modified; rows from being added or deleted; and columns from being added or deleted. See Prevent Changes to a Data Table in the Scripting Guide for examples.

dt <<Set Cell Height(n)

Sets the cell height to the specified number of pixels.

dt<<Set Header Height(n)

Sets the column header’s height to the specified number of pixels.

dt<<Set Label Columns(column1, columns2, ...)

Assigns the specified columns as label columns.

dt<<Set Matrix([matrix])

Inserts the specified matrix into a data table, adding new columns and rows as necessary.

dt<<Set Name(name)

Description

Specifies a name for the table. The name argument is quoted.

Returns

The data table name as a string.

Notes

A change was made to the Set Name message so that now the new table name is returned as a 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.

dt<<Set Property(name, script)

See dt<<New Script(name, script).

dt<<Set Label Columns(column(s), ...)

dt<<Set Label Columns

Turns on the Label attribute for the specified columns. If no columns are listed, it turns the Label attribute off.

dt<<Set Row ID Width(n)

Sets the row ID display width to the specified number of pixels.

dt<<Set Row States([matrix])

Sets the row states for all rows in the data table.

dt<<Set Scroll Lock Columns(column name, ...)

Locks scrolling for the columns specified as quotes strings. If no columns are listed, unlocks scrolling.

dt<<Set Table Variable(name, value)

See dt<<New Table Variable(name, number).

dt<<Sort(<"Private">|<"Invisible">, <"Replace Table">, By(columns), Order("Descending" | "Ascending"), <Output Table Name(name))>

Description

Creates a new table (named after the quoted name) by rearranging the rows of dt according to the values of one or more columns.

Returns

A reference to the sorted table.

Note

See Sort a Data Table in the Scripting Guide for an example.

See Sort Data Tables in Using JMP for details.

dt<<Split(Split(columns), Split By(column), <Group(column)>, <"Private">|<"Invisible">, <Remaining Columns("Keep All"|"Drop All"| Keep(columns)|Drop(columns))>, <Copy Formula(Boolean)>, <Suppress Formula Evaluation(Boolean)>, <Sort by Column Property>, <Output Table (name)>)

Description

Unstacks multiple rows for each Split column into multiple columns as identified by the Split by column. The Split and Split by arguments are required.

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

Split 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.

Note

See Split Values in a Stacked Data Table in the Scripting Guide for an example.

See Split Columns in Using JMP for details.

dt<<Stack(<"Private">|<"Invisible">, Columns(columns), <Source Label Column(string)>, <Stacked Data Column(string)>, <Copy Formula(Boolean)>, <Suppress Formula Evaluation(Boolean)>, <Drop All Other Columns(Boolean)|Name(non-stacked columns)(Keep(column1, column2, ...))|Name(non-stacked columns) (Drop(column1, column2, ...))>, <Output Table(name)>), <Number of Series(n)>, <Contiguous>

Description

Creates a new table by combining the values from several columns in dt into one column.

Returns

A reference to the stacked data table.

Note

See Stack Values in a Data Table in the Scripting Guide for examples.

See Stack Columns in Using JMP for details.

dt<<Subscribe("keyname"(<"client">), On Delete Columns(<function>|<script>)|On Add Columns(<function>|<script>)|On Add Rows(<function>|<script>)|On Delete Rows(<function>|<script>)|On Rename Column(<function>|<script>)|On Close(<function>|<script>)|On Save(<function>|<script>)|On Rename(<function>|<script>))

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 Subscribe to a Data Table in the Scripting Guide for an example.

dt<<Subset(<"Private">|<"Invisible">, <"Selected Columns">, <Columns(column list)>, <"Selected Rows">, <Rows([number, number, ...])>, <By(column list)>, <Sampling Rate(fraction)>, <Sample Size(integer)>, <Stratify(column list)>, <Link to Original Data Table(Boolean)>, <Copy Formula(Boolean)>, <Suppress Formula Evaluation(Boolean)>, <"Keep by Columns">)

Description

Creates a new table from the rows and columns that you specify in dt.

Returns

A reference to the subset data table.

Note

See Subset a Data Table in the Scripting Guide for examples.

See Create a Subset Data Table in Using JMP for details.

dt<<Summary(<"Private">|<"Invisible">, <Group(column)>, <Subgroup(column)>, <N(column)>, <Mean(column)>, <Std Dev(column)>, <Min(column)>, <Max(column)>, <Range(column)>, <Sum(column)>, <CV(column)>, <Freq(column)>, <Weight(column)>, "Include Marginal Statistics", <Link to Original Data Table(Boolean)>, <Statistics Column Name Format(Stat(column)|Column|Stat of Column|Column Stat)>)

Description

Creates a new table of summary statistics for the column that you specify, according to groups and subgroups. Statistics Column Name Format values are quoted.

Returns

A reference to the summary data table.

Note

See Create a Summary Table in the Scripting Guide for examples.

See Summarize Data in Using JMP for details.

dt<<Suppress Formula Eval(Boolean)

Turns off automatic calculation of formulas for data table dt.

dt<<Text to Columns(Delimiters(<separator>, <"tab">, <"newline">), Columns(column1, column2...))

Makes a set of text columns or indicator columns from a delimited text column. "newline" includes the three forms: \r, \n, and \r\n. The separator is quoted.

Example

dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << Text To Columns(
	delimiter( "," ),
	columns( :Brush Delimited )
);

dt<<Transpose(Columns(columns), Rows([matrix]), Output Table Name(name))

Description

Creates a new table (named after the quoted name) from the rows and columns that you specify.

Returns

A reference to the transposed data table.

dt<<Ungroup Columns({column1, column2, ...})

Ungroups the columns defined in the list argument.

dt<<Ungroup Scripts(Name of Script Group|{script1, script2,...})

Removes the specified table scripts or group from the group. The Name of Script Group argument is quoted. See Ungroup Scripts in the Scripting Guide for examples.

dt<<Unsubscribe(keyname, "On Delete Columns"|"On Add Columns"|"On Add Rows"|"On Delete Rows"|"On Close"|"On Col Rename"|"All")

Releases any previous subscriptions to the data table dt. The keyname argument is quoted.

dt<<Update from Database

Updates the data in the table dt with data reimported from the database.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).