Save
Example 1
Summary: Saves a data table as two different file formats, Bigclass.v8xpt and Bigclass.xpt.
Code:
folderPathTmp = "$DESKTOP";
dt = Open("data_table.jmp");
dt << Save( folderPathTmp || "/Bigclass.v8xpt" );
dt << Save( folderPathTmp || "/Bigclass.xpt" );
Code Explanation:
- Define
folderPathTmpvariable. - Open data table;
- Save dataset as "Bigclass.v8xpt".
- Save dataset as "Bigclass.xpt".
Example 2
Summary: Saves a data table as two different file formats in the desktop folder.
Code:
folderPathTmp = "$DESKTOP";
folderPathTmp = "$DESKTOP";
dt = Open("data_table.jmp");
dt << Save( folderPathTmp || "/Bigclass.v8xpt" );
dt << Save( folderPathTmp || "/Bigclass.xpt" );
Code Explanation:
- Define
folderPathTmpvariable. - Redefine
folderPathTmpvariable. - Open data table;
- Save dataset as "Bigclass.v8xpt".
- Save dataset as "Bigclass.xpt".
Example 3
Summary: Opens and saves a data table as an Excel file.
Code:
dt = Open("data_table.jmp");
dt << Save( "$TEMP/" || "DTsave1a.xls" );
Code Explanation:
- Open data table.
- Save data table as Excel file.
Save using Set Table Variable
Summary: Configures a JMP data table by setting variables and calculating a conditional expression, then saves the modified dataset as 'test.jmp'.
Code:
dt = Open("data_table.jmp");
dt << Set Table Variable( "c0-Int", "Run P/E Fit" );
dt << Set Table Variable( "c1-Irrad", "Run P/E" );
dt << Set Table Variable( "c2-wndspd", "Run P/E Fit" );
dt << Set Table Variable( "c3-Tamb", "Run P/E Fit" );
dt << Set Table Variable( "PE0-Pwr_Rpt_Cond", "Run P/E Fit" );
PECoeffs = [2.12840894867226, -0.000357844059384339, 0.0146036223756786, 0.0199778305064677];
dt << Set Table Variable( "c0-Int", PECoeffs[1] );
dt << Set Table Variable( "c1-Irrad", PECoeffs[2] );
dt << Set Table Variable( "c2-wndspd", PECoeffs[3] );
dt << Set Table Variable( "c3-Tamb", PECoeffs[4] );
dt << Set Table Variable( "PE0-Pwr_Rpt_Cond", 900 * (PECoeffs[1] + (PECoeffs[2] * 900) + (PECoeffs[3] * 2) + (PECoeffs[4] * 20)) );
dt << Save( "$TEMP/test.jmp" );
Code Explanation:
- Open data table;
- Set variable "c0-Int" to "Run P/E Fit".
- Set variable "c1-Irrad" to "Run P/E".
- Set variable "c2-wndspd" to "Run P/E Fit".
- Set variable "c3-Tamb" to "Run P/E Fit".
- Set variable "PE0-Pwr_Rpt_Cond" to "Run P/E Fit".
- Define PECoeffs array.
- Set variable "c0-Int" to first PECoeffs value.
- Set variable "c1-Irrad" to second PECoeffs value.
- Set variable "c2-wndspd" to third PECoeffs value.
- Set variable "c3-Tamb" to fourth PECoeffs value.
- Calculate and set "PE0-Pwr_Rpt_Cond" using PECoeffs.
- Save modified dataset as "test.jmp".