cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
RA899
Level III

Getting a dot " . " as a result when computing Column Mean and Qunatile.

Hi, 

I'm trying to get the column names from a table, save it, and then extract its properties. When I try to get the column mean or Quantile but the return is just a dot. No number is returned. The columns are returned as a list as shown below. The results are shown below too. Your

Your help is appreciated. 

RA899_0-1700595619230.png

RA899_1-1700595648336.png

RA899_2-1700595700239.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Getting a dot " . " as a result when computing Column Mean and Qunatile.

You need to properly reference the column 

q_M=col mean( column(char(colnames[21])));

or

q_M=col mean( eval(colnames[21]));
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Getting a dot " . " as a result when computing Column Mean and Qunatile.

You need to properly reference the column 

q_M=col mean( column(char(colnames[21])));

or

q_M=col mean( eval(colnames[21]));
Jim
hogi
Level XII

Re: Getting a dot " . " as a result when computing Column Mean and Qunatile.

wow, Eval(colname) works here as well!

 

Alternatively, you could send the table the message get column references() to get column references which can be directly used in the code.

 

The only disadvantage: there is no option continuous to selectively pick the continuous ones.

The workaround: get column references() accepts a list of column names (or strings):

 

Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
	
AllcolNames = dt << get column references();
colNames = dt << get column references(dt << get column names(continuous));

Col Quantile(colNames[2], 0.95);