You can open text files with the extensions .txt, .csv, and .tsv, and the text is converted to a data table. Files with the .dat extension that consist of text are also supported. Text files can be delimited using almost any character, or they can be fixed-width files.
•
|
Select File > Preferences > Text Data Files to change the import settings so that JMP determines the best way to structure and format the data table.
|
1.
|
Select File > Open.
|
2.
|
On Windows, you can set the file type to Text Files.
|
To have text import use its best guess to arrange the data, select the Data, using best guess option.
(Optional) Select the Select this filter the next time this dialog is invoked option to apply the filter that you chose by default.
Tip: The JMP Home window provides a shortcut to the above steps if you recently opened the file. Right-click the file in the Recent Files list and select Import (Preferences) or Import (Best Guess). (Your import preference is bolded in the right-click menu.)
|
|
|||||||||||||||||||||
|
|
Note: On Windows, JMP can open text files in your computer’s default text editor. Select File > Open, and then select All Files (*.*) from the File name list. Select the text file, and then select Use default program to open. Uncheck to open as text.
JMP detects the file’s structure and shows options for importing text with either delimiters or fixed width fields. If JMP chooses the wrong file structure, click the Delimited fields or Fixed width fields radio button to import the data as the correct format. (For example, the fixed width window might appear when your file is actually delimited.)
The text import preview options are shown in Text Import Preview for Fixed Width Files and Text Import Preview for Delimited Files.
(Available only in the Delimited Import window) Select the check boxes beside the character that marks the end of a field. Alternatively, select the check box beside Other and enter a character if the appropriate character is not listed.
(Available only in the Delimited Import window) Select the check boxes beside the character that marks the end of a line (row). Alternatively, select the check box beside Other and enter a character if the appropriate character is not listed. Note that when JMP finds double quotation marks, the delimiter rules change to look for an end double quotation mark. Other text delimiters, including spaces embedded within the quotes, are ignored and treated as part of the text string.
Specify how to display dates that have two-digit years. Select the 100-year range in which your dates fall. For example, if the earliest date is 2/2/79, and the year is 1979, select 1970-2069. If the earliest date is 2/2/12, and the year is 2012, select 2000-2099. If dates span centuries, you must recode the dates with four-digit years before importing the data.
When you are finished selecting the settings, click Next. The next window shows each column’s modeling type. To change the default modeling types, do one of the following:
The top of the Text Import window shows a preview of the text file as it appears when imported into a JMP data file. Click the Import button to import the data.
6.
|
When you are finished, click Import to complete the text import.
|
Another option is opening a JMP add-in definition (.def) file as text and then editing it in a Script window.
Files that you recently opened are listed in the JMP Home window. For most files, right-click the text file and select Open as Plain Text to open the file in a text editing window. JMP add-in definition files cannot be opened as plain text from the JMP Home window.
1.
|
Select File > Open.
|
‒
|
To open a JMP add-in definition file as text, select All JMP Files or JMP Add-In Files from the list next to File name. Click the Open button arrow, and then select Open as Plain Text. The file opens in a Script window. Skip the remaining steps.
|
‒
|
3.
|
(Optional) To set the default option file type to Text Files, select the check box beside Select this filter the next time this dialog is invoked.
|
5.
|
6.
|
Click Open.
|
1.
|
Select File > Open.
|
3.
|
4.
|
Click Open.
|
For details about converting the text to a data table, follow step 3 in Import Text from the Script Window.
JMP uses the import settings in the preferences to determine how to structure and format the text. Some options include removing quotation marks around text and specifying the rows that contain column headings and data. See Text Data Files in JMP Preferences for details.
Note: You can also import an entire web page as a data table. See Import Remote Files and Web Pages for details.
This section describes how to import text that you paste into the Script window. For details about opening a text file in the Script window, see Open a Text File in a Text Editing Window.
1.
|
Open a new Script window in JMP by selecting File > New > Script (Windows) or File > New > New Script (Macintosh).
|
‒
|
To import all text from the Script window, select File > Import as Data (Windows) or Edit > Import as Data (Macintosh).
|
‒
|
To import specific text, select the text, and then select File > Import as Data (Windows) or Edit > Import as Data (Macintosh).
|