cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
moti617
Level II

Renaming cells

Hello,

 

I'm trying to renaming specific cells after a filter was applied in in a different column. Here is the script that I came up with:

dt = Current Data Table();
df = dt << Data Filter(
Add Filter(
Columns( :"Sample/Control" ),
Where( :"Sample/Control" == "Sample" )
),
);
dt << Go To ( :"Control ID");

I'm only missing the last step, which is to rename the specific cells that are selected. I couldn't find it in any of the guids or help sections.
Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
moti617
Level II

Re: Renaming cells

Hi Uday,

 

Thanks for the help. I was just able to apply your example with my data table and it works perfectly. 

 

View solution in original post

4 REPLIES 4
uday_guntupalli
Level VIII

Re: Renaming cells

@moti617,
         If I may, I would like to request you to take a step back and explain a little more in detail what you are trying to achieve. When you say you would like to rename a cell - do you mean you want to change the value in a cell of a data table ? If this is correct, then you could achieve that without the use of a data filter. Let us take the following example: 

 

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

// Let us assume you want to rename Kaite to Kate and change her age 

dt << Select Where(:name == "KATIE"); 

Wait(0.2); // For Demo only 

SR = dt << Get Selected Rows; 

dt << Clear Select; 

:name[SR] = "KATE"; 

:age[SR] = 13; 

Best
Uday
moti617
Level II

Re: Renaming cells

Hi Uday,

 

Thanks for your response. 

 

I'm working with patient IDs and controls. I would like to to rename all the patient IDs as "sample" but keep the control IDs as they are. I have one column that contains the actual IDs (this is the column in which I would like to change some of the cells - the ones corresponding to patient ID), and another column that differentiates the patient IDs and controls. Under this column, there is either "sample", "positive control" or "negative control" in each cell. The cells with the "sample" option correspond to patient sample ID in the other column. So, I simply selected all the "sample" cells in one column and move to the other column to get all the patient IDs selected. Now I need to rename them. 

 

I hope this is a bit clearer . 

 

Thanks for the support.

Moti  

uday_guntupalli
Level VIII

Re: Renaming cells

@moti617,
   You can still use the same example for what you want to achieve. Would you mind anonymizing your table and uploading a small subset if you dont think the example I provided helps. You can anonymize the table like so: 

 

image.png

Best
Uday
moti617
Level II

Re: Renaming cells

Hi Uday,

 

Thanks for the help. I was just able to apply your example with my data table and it works perfectly.