cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
steven_gong
Level II

How to get all columns into JSL Combine Columns()?

The question is about Combine Columns().

From Scripting index, I can find below example.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << Combine Columns(
	delimiter( "," ),
	Columns(
		:Brush After Waking Up,
		:Brush After Meal,
		:Brush Before Sleep,
		:Brush Another Time
	),
	Selected Columns are Indicator Columns( 1 ),
	Column Name( "When to Brush" )
);

My problem is that I have random 100 columns to 200 columns of data.

How can I utilize the script to get all columns to replace above exact column name in red font?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
steven_gong
Level II

Re: How to get all columns into JSL Combine Columns()?

I tried that out, see below script.

It's actually an easy one, just stuck there for a moment.

Keep trying, keep learning..

 

dt = current data table();
N = Ncol();
dt << Combine Columns(
	delimiter( "," ),
	Columns(
	1::N		
	),
	Selected Columns are Indicator Columns( 0 ),
	Column Name( "Combined" )
);

View solution in original post

2 REPLIES 2
steven_gong
Level II

Re: How to get all columns into JSL Combine Columns()?

Sorry for that there is no red fond in the JSL formatted script.

It's about below column's name in red font.

:Brush After Waking Up,
:Brush After Meal,
:Brush Before Sleep,
:Brush Another Time

steven_gong
Level II

Re: How to get all columns into JSL Combine Columns()?

I tried that out, see below script.

It's actually an easy one, just stuck there for a moment.

Keep trying, keep learning..

 

dt = current data table();
N = Ncol();
dt << Combine Columns(
	delimiter( "," ),
	Columns(
	1::N		
	),
	Selected Columns are Indicator Columns( 0 ),
	Column Name( "Combined" )
);