cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

Add a character to each row in a JMP column

I have a JMP column with data where I would like to systematically add the same initial character to each entry.


Slán



SpannerHead
3 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Add a character to each row in a JMP column

Given a character column with the name "mycol" here is a script that will add the character "A" as the first character to the mycol column for each row

for each row(
     :mycol = "A" || :mycol;
);
Jim

View solution in original post

Craige_Hales
Super User

Re: Add a character to each row in a JMP column

If you are comfortable with regex, you can use find/replace to do it; .* matches the content of each cell and \0 refers to the entire match.

Craige_Hales_0-1747778351769.png

 

(view in My Videos)

Craige

View solution in original post

jthi
Super User

Re: Add a character to each row in a JMP column

Recode can also be used for this with Replace String

jthi_0-1747806552886.png

 

You can also do this by using new formula column and replace data in place

jthi_1-1747806640632.png

jthi_2-1747806668012.png

-Jarmo

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Add a character to each row in a JMP column

Given a character column with the name "mycol" here is a script that will add the character "A" as the first character to the mycol column for each row

for each row(
     :mycol = "A" || :mycol;
);
Jim
Craige_Hales
Super User

Re: Add a character to each row in a JMP column

If you are comfortable with regex, you can use find/replace to do it; .* matches the content of each cell and \0 refers to the entire match.

Craige_Hales_0-1747778351769.png

 

(view in My Videos)

Craige
jthi
Super User

Re: Add a character to each row in a JMP column

Recode can also be used for this with Replace String

jthi_0-1747806552886.png

 

You can also do this by using new formula column and replace data in place

jthi_1-1747806640632.png

jthi_2-1747806668012.png

-Jarmo

Recommended Articles