search for: what_is_your_surname_pet

Displaying 1 result from an estimated 1 matches for "what_is_your_surname_pet".

2011 Oct 16
3
Which function to use: grep, replace, substr etc.?
Hello, I have a simple question but I don't know which method is best to use for my problem. I have the following strings: str1 <- "My_name_is_peter" str2 <- "what_is_your_surname_peter" I would like to apply predefined abbreviations for peter=p and name=n to both strings so that the new strings look like the followings: str1: "My_n_is_p" str2: "what_is_your_surn_p" Which method is the best to use for that particular problem? syrvn -- View this mess...