cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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