- <font color="#800000"><b>String process</b></font> Function <code>paste()</code>, <code>nchar()</code>, <code>strsplit()</code>, <code>substr()</code>, <code>match()</code>, ... ``` a <- paste("string", 9:1, ".txt", sep = "") nchar(a) strsplit(a, "\\.") substr(a, 1, 6) <- "Substr"; a match("Substr9.txt", a) ``` - <font color="#800000"><b>Regulas expression</b></font> Function <code>grep()</code>, <code>gsub()</code>, ... ``` a <- paste("string", 9:1, ".txt", sep = "") grep("([1,3,5-7])", a) b <- paste("string", 9:1, ".txt", sep = "", collapse = " ") gsub("([1,3,5-7]).(txt)", "_\\1-\\2", b) ``` - <font color="#800000"><b>Expression and Parse</b></font> Function <code>expression()</code>, <code>parse()</code>, ... These are important functions for computing in text and useful for processing automatically jobs as shown in "<a href="./batch_more.html">Batch More</a>". ``` a <- 0.05 expression(alpha == 0.05) (ret <- parse(text = paste("alpha == ", a, sep = ""))) plot(1, 1, main = ret) text(1, 1.2, ret) ``` --- <div w3-include-html="../preamble_tail_date.html"></div>