cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Monomorphist
Level III

Column (i) << Data Type(Numeric) returns error message

For years, I have a script that I use about 1x a week. Strangely enough, today, it suddenly returned an error message:

 

Argument to Type in access or evaluation of ‘Data Type’, Data Type Numeric ) /*###*/

For(i = 18, i < 103, i = i + 2,
	Column(i) << Data Type(Numeric)
);

I think it's just last week that I've updated to JMP v17.2. Is there a change in the new version? Needless to say, that in the original columns, there could be characters present (such as  "n/a" etc). But that was always the case - and that's why I need to convert format to numeric.

Thanks for advise

 

 

 

 

12 REPLIES 12
jthi
Super User

Re: Column (i) << Data Type(Numeric) returns error message

I don't remember there being such issues, but I cannot access JMP17.2 currently. This script does work in JMP18.1 though

Names Default To Here(1); 

open("$SAMPLE_DATA/Big Class.jmp");

For(i = 1, i <= N Cols(dt), i++,
	Column(i) << Data Type(Numeric);
);

jthi_0-1731337168276.png

Based on Scripting Index the argument should be a string (<< Data Type("Numeric") but it seems to work fine (and JMP uses non-string versions when it generates the script with << set data type).

-Jarmo
Monomorphist
Level III

Re: Column (i) << Data Type(Numeric) returns error message

Tried as string ("numeric") - no success. Same error message. By the way, this isn't the only script that fails at this command line, others do, too, since the update.

Where do you get 18.1? I've checked for update last week (because of one of my others threads that got suddenly popular, and 18.1 was recommended), but only got 17.2 (and tells me that I have the latest version). And now my scripts don't work anymore....! 

mmarchandFSLR
Level IV

Re: Column (i) << Data Type(Numeric) returns error message

This example works in 17.2.

txnelson
Super User

Re: Column (i) << Data Type(Numeric) returns error message

My misread of the issue......response deleted

 

 

Jim
Monomorphist
Level III

Re: Column (i) << Data Type(Numeric) returns error message

Since when? Runs for years with () ! By the way, I've tried other scripts with the same arguments. They all stop and give me error message now. Tens of scripts that worked for years!

mmarchandFSLR
Level IV

Re: Column (i) << Data Type(Numeric) returns error message

I still have access to 17.2.  I created a test table and executed your exact script on it.  It worked without error, changing every other column to numeric and replacing the "hi" string with a missing value.

 

mmarchandFSLR_0-1731339752384.png

 

Monomorphist
Level III

Re: Column (i) << Data Type(Numeric) returns error message

This is utterly bizarre. Would you be willing to try the script in the attached? It doesn't work in my version (but should, in my eyes?!?)

mmarchandFSLR
Level IV

Re: Column (i) << Data Type(Numeric) returns error message

Strange, indeed.  I ran the script on the test table using JMP 17.2.0 and had no problem.

 

mmarchandFSLR_0-1731341773930.png

 

Monomorphist
Level III

Re: Column (i) << Data Type(Numeric) returns error message

Ok. This means it isn't a matter of the script, nor the table, nor the software version. Conflicts somewhere else, deep inside.....

Well, at least I found V18 in my software depot. Will try new install, then.

Recommended Articles