cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar

word function changing a String into separate numeric values

I currently and trying to separate out numberic values that are stored in a single column as a string in this format: "9@12.5@32"

 

I am trying to use the word function to create new columns with single numeric values with this jsl:

 

dt<<New Column("New", Numeric, Continuous,
Formula(word(1,:Column,"@")));

 

but jmp will automatically change this to a categorical column. Is there a way to force it to be numeric?

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager

Re: word function changing a String into separate numeric values

JMP changes the data type of the column to a character because the Word() function returns a character string.

 

You can use the Num() function to convert a character string to a numeric value.

 

dt<<New Column("New", Numeric, Continuous,
Formula(num(word(1,:Column,"@"))));
-Jeff

View solution in original post

2 REPLIES 2
Jeff_Perkinson
Community Manager Community Manager

Re: word function changing a String into separate numeric values

JMP changes the data type of the column to a character because the Word() function returns a character string.

 

You can use the Num() function to convert a character string to a numeric value.

 

dt<<New Column("New", Numeric, Continuous,
Formula(num(word(1,:Column,"@"))));
-Jeff
MathStatChem
Level VI

Re: word function changing a String into separate numeric values

Try this:

 

dt<<New Column("New", Numeric, Continuous,
Formula(Num(word(1,:Column,"@"))));