Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- How to add analysis columns based on the column's data type?

Topic Options

- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 9, 2014 1:28 AM
(4165 views)

Hi,guys,

When we are using Tabulate function,is there any way for us to add analysis columns based on the data type?

I mean,for example,now I have a raw table with 1 column who's data type is character,all others are Numeric.But the number of Numeric columns would change because another script.I want to add all the Numeric columns as analysis columns when using Tabulate no matter what are the column names and how many Numeric columns there are.

,Is there any way to realise this by writing JSL script?

Thanks for help.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

hi there,

try this.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// make a list of the continuous columns in the data table

CNames = dt << Get Column Names( Continuous );

Tabulate(

Add Table(

Column Table( Grouping Columns( :age ) ),

Row Table( Analysis Columns( Eval( CNames ) ), // plant the list of columns in the formula

Statistics( N, Mean, Std Dev ) )

)

);

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

hi there,

try this.

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// make a list of the continuous columns in the data table

CNames = dt << Get Column Names( Continuous );

Tabulate(

Add Table(

Column Table( Grouping Columns( :age ) ),

Row Table( Analysis Columns( Eval( CNames ) ), // plant the list of columns in the formula

Statistics( N, Mean, Std Dev ) )

)

);

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: How to add analysis columns based on the column's data type?

This script can work,Thank you