cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

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

How to format a list of columns?

I just can't seem to figure out the syntax. I'm trying to set this group of columns to a fixed decimal. I can't figure out how to assign the columns to a variable

 

 

colList = column( dt, "MEAN", "STDEV", "MIN", "Q1", "MEDIAN", "Q3", "MAX")
For(i=1,i<=n items(colList), i++,
column(dt, colList[i]) << data type("numeric")<< Format( "Fixed Dec", 12, 3 );
);

 

1 REPLY 1

Re: How to format a list of columns?

You're close, you just need the column names to be in a list (see code below.)

 

Be sure to check out "Standardize Attributes" in the columns menu (or from a right-click on a column header). It will allow you to alter settings for all selected columns en-masse via point-and-click, which may obviate the need to script this, depending on your use case.

 

Cheers,

Brady

 

dt = Current Data Table();

colList = {"MEAN", "STDEV", "MIN", "Q1", "MEDIAN", "Q3", "MAX"};

For( i = 1, i <= N Items( colList ), i++,
	Column( dt, colList[i] ) << data type( "numeric" ) << Format( "Fixed Dec", 12, 3 )
);

Recommended Articles