Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
axcelenator1
Level III

Standardize attributes of columns is not working

Hello, I have the following code: I want the new columns generated inside the dt will be as a numeric&continuous so I can force on the data some variabilty charts and other things. But after running the script the data is still remains as Character & Nominal

 


dt = New Table( "myExample2", Add Rows( 3 ), New Column( "Column 1", Numeric, Continuous, Format( "Best", 8 ), Set Selected, Set Values( [2, 5, 8] ) ), New Column( "Column 2", Character, Nominal, Set Values( {"5|6|5", "5|6|5", "5|6|5"} ) ), Set Row States( [0, 0, 1] ) ); For( i = 1, i<= 3, i++, dt << New Column ("C" || char(i), Numeric, Continuous, Formula( Word( i, As Column( Column( "Column 2" ) ), "|" ) ) ) );
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Standardize attributes of columns is not working

First, you can use the name directly, :Column 2, without the As Column() directive.

 

Second, put the Word() function inside the Num() function to convert the value to a number.

Learn it once, use it forever!

View solution in original post

1 REPLY 1
Highlighted

Re: Standardize attributes of columns is not working

First, you can use the name directly, :Column 2, without the As Column() directive.

 

Second, put the Word() function inside the Num() function to convert the value to a number.

Learn it once, use it forever!

View solution in original post

Article Labels

    There are no labels assigned to this post.