cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
Tom_Watson
Level II

How Do I Make a Data Column Numeric Continuous

I've been stumbling over this and haven't been able to find the proper syntax.

 

In my data I have a column titled "InstHead_Serial", which is always a numeric value of 6 numeric characters, with no decimal.

 

I want to treat the data as numeric in my analysis, but when it gets pulled in from our database it is character type data.

 

I've been trying many permutations of the command below to convert the data type to numeric/continuous, with no avail.  If someone can help by providing the right syntax, it will be very helpful; thanks in advance!

 

Column( "InstHead_Serial" ) << data type( numeric, continuous, Format( "" ) );

 

 

 

4 REPLIES 4
txnelson
Super User

Re: How Do I Make a Data Column Numeric Continuous

This should give you what you want

column("InstHead_Serial") << data type(numeric,continuous,format("Fixed Dec", 6,0));

or

column("InstHead_Serial") << data type(numeric,continuous,format("Best"));
Jim
Tom_Watson
Level II

Re: How Do I Make a Data Column Numeric Continuous

Thanks Jim!

I tried both of these format types and they both result in the following outcome:

Data Type is changed from character to numeric

Format is changed to either Fix Dec or best per the script recipe you provided

Modeling Type remains as "Nominal" vs "Continuous"; I tried the following:

, Continuous, 

, "Continuous", 

, Modeling Type ("Continuous")

, Modeling Type (Continuous)

 

I'm able to manually go into the data table and select the column and change the column info to Continuous, so it seems like something should work, but nothing I've tried so far.

 

Happy to try more ideas!

txnelson
Super User

Re: How Do I Make a Data Column Numeric Continuous

I don't know why it is not working for you, but it is a simple fix, just separate out the Modeling Type into a separate statement.

column("InstHead_Serial") << data type(numeric,format("Best"));
column("InstHead_Serial") << modeling type(continuous);
Jim
Tom_Watson
Level II

Re: How Do I Make a Data Column Numeric Continuous

That did it; awesome and thank you very much!!