cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Make the quoted string in the :Name() function an evaluated element

I would like the quoted string in the :Name() function to be an element that JMP evaluates, rather than just being a quoted string.  I would like the below script to work

names default to here(1);
dt=current data table();
thename="NPN1";

bivariate(x(:Name(thename)),y(:Pnp1))
4 Comments
gzmorgan0
Super User (Alumni)

I agree this would make the syntax consistent.  Currently, I like to use, and train to use, the syntax, column(<dt,> "name") or column(thename), which I know Jim is aware of. Just adding a ditto to Jim's wish list item, and showing an alternative to those reading this on the blog.

mjoner
Level VI

I like this idea, too. Another potentially acceptable option might be As Name(thename)?

John_Sall
Staff

Name is always intended as parse-time. There are plenty of ways to make the reference indirect, e.g. :

Open("$Sample_Data/Big Class.jmp");
theX = "weight"; theY = "height";
Bivariate(Y(eval(theY)),X(eval(theX)));
Jeff_Perkinson
Community Manager
Status changed to: Not Planned For Now