Scripting Guide > Scripting Platforms > Specify Which Columns to Analyze > Specify Multiple Column Names at Once
发布日期: 04/13/2021

Specify Multiple Column Names at Once

If you have a lot of column names, instead of listing each one individually, you can use lists as column arguments. The following example gets the column names from a list and runs a Distribution on each column in the list.

dt = Open( "$SAMPLE_DATA/Cities.jmp" );
dt << Fit Group( Oneway( Y( {:SO2, :POP} ), X( :State ) ) );

If you do not know the column names when you are writing the script, use column indices, as done in the following example.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Distribution( Y( 1::N Col( dt ) ) );

You can also use indices when specifying effects as shown here:

dt << Fit Model( Y( :y ), Effects( 1 :: 4 ) );
需要更多信息?有问题?从 JMP 用户社区得到解答 (community.jmp.com).