- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Help with script to rename data table
Hello,
I'm trying to streamline some analysis and am dipping my toes into JSL. In the current case I'm running a 4PL fit of some data then generating a table of the curve parameter summaries. I'm able to make the new table but it will be named by default "Untitled X" (where x is just an iteration of numbers...). I can manually rename to "4PL"...which my follow on tasks will point to.
What I'd like to do is have the original script make the new table and set the name to "4PL". I've searched the archives and tried the Set Name function...but I think I'm not getting the syntax correct. Any help would be appreciated.
Here's the script I'm running (without the Set Name function):
Names Default To Here( 1 );
rpt = New Window( "RM Tracking- CV - Fit Curve of Avg Response by log(Conc)",
Data Table( "RM Tracking- CV" ) << Fit Curve(
Y( :Avg Response ),
X( :"log(Conc)"n ),
Group( :Individual Curve with Lot# ),
Fit Logistic 4P( Test Parallelism ),
SendToReport(
Dispatch( {"Logistic 4P"}, "Plot", OutlineBox, {Close( 1 )} )
)
)
);
Wait( 0 );
rpt["Fit Curve", "Logistic 4P", "Group Summary", Table Box( 1 )] <<
Make Into Data Table;
rpt << Close Window;
Thanks very much for your help!
Chris
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with script to rename data table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with script to rename data table
Here is an example using set name
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Nonlinear Examples/Bioassay.jmp");
fc = dt << Fit Curve(
Y(:Toxicity),
X(:log Conc),
Group(:formulation),
Fit Logistic 4P(Test Parallelism),
SendToReport(Dispatch({"Logistic 4P"}, "Plot", OutlineBox, {Close(1)}))
);
dt_logistics = Report(fc)["Fit Curve", "Logistic 4P", "Group Summary", Table Box(1)] << Make Into Data Table;
fc << Close Window;
dt_logistics << Set Name("4PL");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with script to rename data table
Hi Jarmo,
Thanks for the response. I've used the following for my case (data table is contained within a project file):
Any thoughts?
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with script to rename data table
My guess is that the Fit Curve is failing, and therefore, "fc" is not getting populated. One item that could cause this is that either your X or Y columns are not set as Continuous.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with script to rename data table
thanks Jim.
Both are continuous and the 4PL fit works if I do it independently.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with script to rename data table
Remove the
fc << close window;
and then run the script again. The error message is indicating the display output window can not be found. If the window is closing faster than the Make Into Data Table, there could be an issue.
Also, you need to use the JSL icon at the top of the Preview window when entering JSL into your question, or responses. It allows the reader to more easily examine your scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with script to rename data table
Jim,
Thanks again...and thanks for your patience as I work to figure this out.
Tried your suggestion to no avail; still getting the same error msg.
FYI - I can run the following and it does the analysis and makes the Data Table...just doesn't rename it:
Names Default To Here( 1 );
rpt = New Window( "RM Tracking- CV - Fit Curve of Avg Response by log(Conc)",
Data Table( "RM Tracking- CV" ) << Fit Curve(
Y( :Avg Response ),
X( :"log(Conc)"n ),
Group( :Individual Curve with Lot# ),
Fit Logistic 4P( Test Parallelism ),
SendToReport(
Dispatch( {"Logistic 4P"}, "Plot", OutlineBox, {Close( 1 )} )
)
)
);
Wait( 0 );
rpt["Fit Curve", "Logistic 4P", "Group Summary", Table Box( 1 )] <<
Make Into Data Table;
rpt << Set Name("4PL");
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with script to rename data table
try
current data table() << set name("4PL");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with script to rename data table
dt = rpt["Fit Curve", "Logistic 4P", "Group Summary", Table Box( 1 )] <<
Make Into Data Table;
dt << Set Name("4PL");