cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • See how to interactively organize and restructure data for analysis. Register for May 29 webinar, 2pm US ET.

Discussions

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

Fast way to replace selected entries with a new value

A user selects some rows and a column and wants to replace the selected entries with a new values via the GUI.

names default to here(1);
colname = "column with values between 1 and 10";
dt = new table("test", add rows(5000000), new column ("c",Character,  set each Value(Char(random integer(10)))));
dt << Select Where( :c == "7" ) << select columns (1);
newname = "column with values between 1 and 10, 7=X";
newvalue="X";
:c << set name( newname);

The score is based on time. Every click, every keystroke, every double click and every calculation counts in fractions of a second.

6 REPLIES 6
hogi
Level XIII

Re: Fast way to replace selected entries with a new value

Copy & Paste

(view in My Videos)

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

linked Subset: type & Fill to end

It takes forever—better make sure you’ve got a full pot of coffee ready!

(view in My Videos)

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

Name Selection in Column:
It's accessible right via the column header - sooo cool!
I am sure there is a hidden trick to pick THE selected column as the target column - but I did not find it yet ...

(view in My Videos)

 

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

Name Selection in Column - with an auxiliary column:

(view in My Videos)

 

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

Why not Recode?

(view in My Videos)

It works fine for simple replacements. However, in general, the selected rows won't correspond to a specific value in the target column.
So, the demo case is not ideal. Sorry.

hogi
Level XIII

Re: Fast way to replace selected entries with a new value

And how to select rows? -> take care there are no variable inside the search expression !

(view in My Videos)

Recommended Articles