cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
matt7109
Level III

Store Column as list?

Hi there,

I was wondering if there is any way to store the values of a column in a list, arrray, etc. 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Store Column as list?

Here is the example taken from

     Help==Scripting Index==>Data Table==>Column Scripting==>Get Values

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
valuesMatrix = :Height << Get Values;
Show( valuesMatrix );
valuesList = :Height <<
GetValues(
	Format(/* a numeric column will be list of character items if a format is supplied, see format function */
		"Currency",
		"EUR",
		2,
		<<use locale(
			0 /* ignore locale and use period for decimal.  the default is 1: use the locale. */
		)
	)
);
Show( valuesList );
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Store Column as list?

Here is the example taken from

     Help==Scripting Index==>Data Table==>Column Scripting==>Get Values

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
valuesMatrix = :Height << Get Values;
Show( valuesMatrix );
valuesList = :Height <<
GetValues(
	Format(/* a numeric column will be list of character items if a format is supplied, see format function */
		"Currency",
		"EUR",
		2,
		<<use locale(
			0 /* ignore locale and use period for decimal.  the default is 1: use the locale. */
		)
	)
);
Show( valuesList );
Jim

Re: Store Column as list?

JSL makes this operation very easy. It is bi-directional, too!

Please see Help > Books > Scripting Guide for more information. There is a lot of information about working with data columns and tables as matrices and lists because this task is common in scripts. You can see the entire object protocol at once by selecting Help > Scripting Index. Change the drop down menu at the top left to Objects, then select Data Column.

Asking a question here is a great way to solve a problem but your question will be limited by your current knowledge and understanding. If you don't know JMP or JSL, then your question must be based on some other frame of reference that is unlikely to apply. That is, JMP, and therefore JSL, is not like Excel, R, or any other software. Learning from the Scripting Guide will correct that problem.