str.replace.at.pos | R Documentation |
replace a string at the positions specified by pos
## S3 method for class 'replace.at.pos' str(str, pos, new, pos.mat.like.list = FALSE)
str |
a vector, or a single element |
pos |
a matrix of substring positions, or a list of such matrices if str is a vector |
new |
a vector of new strings for each substring position, or a list of such vectors if length(str)>1 |
string (vector) of length(str) in which the substrings have been replaced
## Not run: str = "1234567890" pos = rbind(c(7,7),c(4,5)) new = c("XXX","...") str.replace.at.pos(str,pos,new) str = c("1234567890","ahgdasdajsdgadhsabd") str.replace.at.pos(str,pos,new) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.