xxxxxxxxxx
r.eval("""
replace_function<-function(w) {
while (grepl('7777',w) | grepl('8888',w)) {
print(w)
if (grepl('7777',w)) { w<-sub('7777','8',w) }
else { w<-sub('8888','7',w) } }
return(w) }
string<-paste(replicate(70,'7'),collapse='')
replace_function(string)""")
No comments:
Post a Comment