Scripting Guide > Scripting Platforms > Apply a Platform Preset to a Data Table
Publication date: 07/08/2024

Apply a Platform Preset to a Data Table

You can apply a platform preset object from one object to another object of the same type using the << Apply Preset message. The following example saves a Oneway analysis of two columns from the Big Class.jmp sample data as a platform preset then applies that preset to two columns from the Dogs.jmp sample data.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) );
preset = obj << New Preset();
dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" );
obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) );
Wait( 1 );
obj2 << Apply Preset( preset );

You can also search for a preset to apply to an object. The following example applies the Compare Distributions preset from the Sample Presets folder to a data set.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Oneway( Y( :height ), X( :sex ) );
Wait( 1 );
obj << Apply Preset( "Sample Presets", "Compare Distributions" );
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).