- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Add script stored in variable to data table
How can I add a script to create a data table to another data table? I have tried different combinations of Get Script, New Script, and Eval without success. I am using JMP 18.1.2.
// Example
dt_1; // Starting table 1.
dt_2; // Starting table 2.
dt_2_script = dt_2 << Get Script;
// None of these work:
dt_1 << New Script( "dt_2 Script", dt_2_script );
dt_1 << New Script( "dt_2 Script", Eval( dt_2_script ) );
dt_1 << New Script( "dt_2 Script", dt_2 << Get Script );
dt_1 << New Script( "dt_2 Script", Eval( dt_2 << Get Script ) );
2 ACCEPTED SOLUTIONS
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add script stored in variable to data table
Here is one option (evaluate it with while utilizing name expr)
Names Default To Here(1);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");
dt1_script = dt1 << Get Script;
Eval(EvalExpr(
dt2 << New Script("Create dt1", Expr(Name Expr(dt1_script)))
));
-Jarmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add script stored in variable to data table
Try this
Eval( Eval Expr( dt_1 << new script( "dt_2 Script", Expr( dt_2_script = dt_2 << Get Script ) ) ) )
Jim
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add script stored in variable to data table
Here is one option (evaluate it with while utilizing name expr)
Names Default To Here(1);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");
dt1_script = dt1 << Get Script;
Eval(EvalExpr(
dt2 << New Script("Create dt1", Expr(Name Expr(dt1_script)))
));
-Jarmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Add script stored in variable to data table
Try this
Eval( Eval Expr( dt_1 << new script( "dt_2 Script", Expr( dt_2_script = dt_2 << Get Script ) ) ) )
Jim