Subscribe Bookmark RSS Feed

Why does using a variable create an error?

theace

Community Trekker

Joined:

Jul 26, 2012

Can anyone explain why, in JMP 8

summarize(qlow=quantile(8,0.25))

works as desired (putting the 0.25 quantile statistics of the 8th column into variable qlow), but

::aa=8;

summarrize(qlow=quantile(::aa,0.25))

gives the error message
 

Column not found in access or evaluation of 'aa' , ::aa

?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

This works:

summarize(qlow=quantile(column(::aa),0.25));

3 REPLIES
Solution

This works:

summarize(qlow=quantile(column(::aa),0.25));

theace

Community Trekker

Joined:

Jul 26, 2012

It does.

Why does it?

pmroz

Super User

Joined:

Jun 23, 2011

Variables don't always work the way you think they will in JSL.  I suspect that the quantile argument expects either a column descriptor (:My Column), column number, or column reference:

column(8)

column("My Column")

Just supplying ::aa confused it.