cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to design an experiment, explore factor-response relationships, assess tradeoffs, and ID best settings. Register for Sep. 11 Mastering JMP.

Discussions

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

referencing column using Column("name")

Hi,

I have a "quick" question:

dt = Open( "$Sample_data/Big Class.jmp" );

//// These don't work;
dt << Select where( Column("sex") == "F"); 
dt << Select where( Column(3) == "F");

//// Only this works...why?? dt << Select where (:sex == "F");

I am pretty sure all these options used to work for me.....has something changed? I am using JMP16.

Reason I am asking is because I usually have the column names in a list, then create iteration using For loop and Column(colname[i]) to point to the appropriate column. 

 

Any help will be much appreciated. Thank you.

Derchieh

2 ACCEPTED SOLUTIONS

Accepted Solutions
pmroz
Super User

Re: referencing column using Column("name")

This works:

dt = Open( "$Sample_data/Big Class.jmp" );

//// These work now;
dt << Select where( as Column("sex") == "F"); 
dt << Select where( as Column(3) == "F");
//// Only this works...why??
dt << Select where (:sex == "F");

In general, if column("col-name") doesn't work, try as column("col-name").

View solution in original post

txnelson
Super User

Re: referencing column using Column("name")

You need to use the As Column() function.  I tested the code back to JMP 11 and the Column() function did not work, only the As Column()

names default to here(1);
dt = Open( "$Sample_data/Big Class.jmp" );

//// These don't work;
dt << Select where( as Column("sex") == "F"); 
dt << Select where( as Column(3) == "F");
//// Only this works...why??
dt << Select where (:sex == "F");
Jim

View solution in original post

3 REPLIES 3
pmroz
Super User

Re: referencing column using Column("name")

This works:

dt = Open( "$Sample_data/Big Class.jmp" );

//// These work now;
dt << Select where( as Column("sex") == "F"); 
dt << Select where( as Column(3) == "F");
//// Only this works...why??
dt << Select where (:sex == "F");

In general, if column("col-name") doesn't work, try as column("col-name").

txnelson
Super User

Re: referencing column using Column("name")

You need to use the As Column() function.  I tested the code back to JMP 11 and the Column() function did not work, only the As Column()

names default to here(1);
dt = Open( "$Sample_data/Big Class.jmp" );

//// These don't work;
dt << Select where( as Column("sex") == "F"); 
dt << Select where( as Column(3) == "F");
//// Only this works...why??
dt << Select where (:sex == "F");
Jim
derchieh
Level III

Re: referencing column using Column("name")

Thanks heaps for checking....!

Recommended Articles