cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
jlmbs
Level III

How to write a JSL script to copy and paste a data table Source into another data table?

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to write a JSL script to copy and paste a data table Source into another data table?

Here is one option

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

// create table with 
dt_summary = dt << Summary(
	Group(:age),
	Mean(:height),
	Mean(:weight),
	Freq("None"),
	Weight("None")
);

source_script = dt_summary << Get Property("Source");
close(dt_summary, no save);

Eval(EvalExpr(
	dt << New Script("SourceFromSummary",
		Expr(Name Expr(source_script))
	);
));
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: How to write a JSL script to copy and paste a data table Source into another data table?

Here is one option

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

// create table with 
dt_summary = dt << Summary(
	Group(:age),
	Mean(:height),
	Mean(:weight),
	Freq("None"),
	Weight("None")
);

source_script = dt_summary << Get Property("Source");
close(dt_summary, no save);

Eval(EvalExpr(
	dt << New Script("SourceFromSummary",
		Expr(Name Expr(source_script))
	);
));
-Jarmo

Recommended Articles