cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
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

 

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

 

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