gsubfn is like gsub but can take a replacement function or certain other objects instead of the replacement string. Matches and back references are input to the replacement function and replaced by the function output. gsubfn can be used to split strings based on content rather than delimiters and for quasi-perl-style string interpolation. The package also has facilities for translating formulas to functions and allowing such formulas in function calls instead of functions. This can be used with R functions such as apply, sapply, lapply, optim, integrate, xyplot, Filter and any other function that expects another function as an input argument or functions like cat or sql calls that may involve strings where substitution is desirable.
|Date of publication||2014-08-27 21:17:14|
|Maintainer||G. Grothendieck <firstname.lastname@example.org>|
|License||GPL (>= 2)|
as.function.formula: Make a one-line function from a formula.
fn: Transform formula arguments to functions.
gsubfn: Pattern Matching and Replacement
match.funfn: Generic extended version of R match.fun
read.pattern: Read file or text string using a regular expression to...
strapply: Apply a function over a string or strings.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.