[R] Search and convert string function

peng shen michael_shen at hotmail.com
Sun Mar 6 03:11:46 CET 2005


Hi all,
I want to do this kind of function In R enviroment :
For example :
R <- 4
testString <- "I love $R"
then search this testString, when find "$R",replace "$R" to R ,and because 
the value of R is 4
So the final string I want to get is "I love 4"
How can I implement? Thanks advance

Michael




More information about the R-help mailing list