cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

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

Changing the format of a variable in a data table

Hi,

i have the following syntax:

dt2<< Summary(
	Group( :Sample ),
	Mean( :dilution factor, :l10t ),
	Freq( "None" ),
	Weight( "None" ),
	Output Table( "log10t" ),
	Std Err( :l10t ),
	Link to original data table(0)
);

Loq = Data Table( "log10t" );


Loq << column(:Mean(l10t)) <<Format( "Fixed Dec", 12, 4 );

Loq << column(:Name ("Mean(l10t)")) << Format( "Fixed Dec", 12, 4 );  

Column(Loq,:Mean(l10t)) << Set Format ( "Fixed Dec", 12, 4 );

so l get a data table using the above syntax, however, the variable Mean(l10t) it produces in the table has 10 decimal places, the next three lines of code are trying to re format to a fixed decimal place of 4, none has worked, could anyone please advise why??

Also when i work with variables in JMP sometimes i can use just :variable name to use the variable, quite often this wont work and i have to use :Name("Variable Name"), why??

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Changing the format of a variable in a data table

Either of these syntax forms will work

loq:Name("Mean(l10t)") << Format( "Fixed Dec", 14, 4 );

column( loq, "Mean(l10t)" ) << Format( "Fixed Dec", 14, 4 );
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Changing the format of a variable in a data table

Either of these syntax forms will work

loq:Name("Mean(l10t)") << Format( "Fixed Dec", 14, 4 );

column( loq, "Mean(l10t)" ) << Format( "Fixed Dec", 14, 4 );
Jim
Mickyboy
Level V

Re: Changing the format of a variable in a data table

thanks Jim, i had tried several bits of code, that worked a treat

Recommended Articles