fsub | R Documentation |
Finds strings from pats
in x
and replaces them with corresponding values of (possibly recycled) subs
.
fsub(x, pats, subs)
x |
An atomic character object. |
pats |
A complete character vec of patterns to replace. |
subs |
A complete character vec of replacement strings |
Atomic character object.
Other strings:
blank()
,
chn()
,
delim()
,
gr
,
ipat()
,
makestr()
,
markdown_help()
,
maxnch()
,
ox()
,
ox_vals()
,
pgrid_help()
,
revstr()
,
spaces()
,
ss_help()
,
tocase()
,
weave()
egArg1 <- c("a", "few", "words", "in", "a string")
agArg2 <- paste0(egArg1, collapse = " ")
egPats <- c("a", "f", "w", "i", "s", " ")
egSubs <- c("A", "F", "W", "I", "S", "_")
egArg1
egArg2
fsub(egArg1, egPats, egSubs)
fsub(egArg2, egPats, egSubs)
fsub(egArg1, egPats, "_")
fsub(egArg2, egPats, "_")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.