cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

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

Operating on selected rows

Hello Everyone,

Is it possible for me to operate a function on selected rows without using the FOR loop.

For example

k = dt<< Get Rows Where (pt:Parameter = ot:Parameter);

For (i=1,i<= Nrow(k),i++,

pt:value[k] = pt:value[k]/5;   // I want the value of selected rows only to be divided by 5.

);


Is it possible for me to rewrite the code without using simple JMP function for it ? I dont like using too many for loops.


Thanks in advance!


regards,

Akash

6 REPLIES 6
ian_jmp
Level X

Re: Operating on selected rows

NamesDefaultToHere(1);

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

Wait(3);

k = dt << getRowsWhere(:sex == "M");

h = Column(dt, "height") << getValues;

h[k] = h[k]*0.5;

Column(dt, "height") << setValues(h);

anders_bankefor
Level III

Re: Operating on selected rows

Hi Ian,

what does "Wait(3);" do in this context?

BR

Anders

ian_jmp
Level X

Re: Operating on selected rows

It causes JMP to pause for 3 seconds, and I inserted it so that you could see what's happening (run the code and look at the column called 'sex'). You can remove it of course.

ms
Super User (Alumni) ms
Super User (Alumni)

Re: Operating on selected rows

Or try the "Divide To" assignment:

dt:height[k] /= 5

David_Burnham
Super User (Alumni)

Re: Operating on selected rows

Just curious, why don't you like using loops?

-Dave

Re: Operating on selected rows

Thanks for replies.

Just that i deal with huge amounts of data and running loops for every action increase the processing time. I hope inbuilt functions/operators will be more optimized than me writing loops.

Recommended Articles