cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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 VII

Re: word function changing a String into separate numeric values

Try this:

 

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

Recommended Articles