How to combine/recode two columns?I want to combine 2 columns. Suppose in sample library, big class example.
I want a new column which is combination of two columns "sex" and "age". The resulting column should have rows in form F12, M12 etc.
I tried with to combine columns using utility>combine but it gives error.
Thanks for your help
Re: How to combine/recode two columns?Are you running the exact copy of the code below?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "Column", Character, Nominal, Formula( :sex || Char( :age ) ) );
If not, can you include the exact JSL you are using.
Re: How to combine/recode two columns?hi i get an error on the snippet of code "<<"
Re: How to combine/recode two columns?Hi Ron,
Thanks for the script. Even I think concatenate function just takes characters.
Santosh
Re: How to combine/recode two columns?Thank You.
Re: How to combine/recode two columns?try this.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "Column", Character, Nominal, Formula( :sex || Char( :age ) ) );
i think the concatenate function only takes characters.
best,
ron
Re: How to combine/recode two columns?Have you tried selecting both columns, right-clicking on the column name and selecting New Formula Column>Character > Concatenate?