Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
paul_phelan
Level I

How do I Setting Preferences with a Script

If I wanted to make sure the preferences were the same on any machine prior to executing a script, to ensure the output was consistent and then set them back again, is there any way to script it.

 

I can get the preferences with Get Platform Preferences()

But it looks like Set Platform Preferences won't accept a string as an argument.

 

x = "(Association Analysis(
		Transaction Listing( 1 ),
	))";
	
Set Platform Preferences( x );
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How do I Setting Preferences with a Script

I think you can use something like the following to accomplish what you're trying to do.

//get current settings
prev = Get Platform Preferences( Association Analysis( Transaction Listing ) );

//set preference for your script
Set Platform Preferences( Association Analysis( Transaction Listing(1) ) );

//execute analysis script

//reset platform preferences to previous values
eval(prev);
Michael Crotty
Sr Statistical Writer
JMP Development

View solution in original post

1 REPLY 1
Highlighted

Re: How do I Setting Preferences with a Script

I think you can use something like the following to accomplish what you're trying to do.

//get current settings
prev = Get Platform Preferences( Association Analysis( Transaction Listing ) );

//set preference for your script
Set Platform Preferences( Association Analysis( Transaction Listing(1) ) );

//execute analysis script

//reset platform preferences to previous values
eval(prev);
Michael Crotty
Sr Statistical Writer
JMP Development

View solution in original post

Article Labels

    There are no labels assigned to this post.