cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

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