Skip to content

gsubfn

Utilities for Strings and Function Arguments

v0.7 · Mar 16, 2018 · GPL (>= 2)

Description

The gsubfn function 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. There is also a facility for returning multiple objects from functions and a version of transform that allows the RHS to refer to LHS used in the same transform.

Downloads

18.8K

Last 30 days

822nd

18.8K

Last 90 days

18.8K

Last year

CRAN Check Status

2 NOTE
12 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang NOTE
r-devel-linux-x86_64-debian-gcc NOTE
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (14 non-OK)
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

Maintainer: ‘G. Grothendieck <ggrothendieck@gmail.com>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "G.",
                    family = "Grothendieck",
                    role = c("aut", "cre"),
                    email = "ggrothendieck@gmail.com")
as necessary.
NOTE r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

Maintainer: ‘G. Grothendieck <ggrothendieck@gmail.com>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "G.",
                    family = "Grothendieck",
                    role = c("aut", "cre"),
                    email = "ggrothendieck@gmail.com")
as necessary.
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
OK r-oldrel-macos-arm64

*


            
OK r-oldrel-macos-x86_64

*


            
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 9, 2026
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

Maintainer: ‘G. Grothendieck <ggrothendieck@gmail.com>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "G.",
                    family = "Grothendieck",
                    role = c("aut", "cre"),
                    email = "ggrothendieck@gmail.com")
as necessary.
NOTE r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

Maintainer: ‘G. Grothendieck <ggrothendieck@gmail.com>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "G.",
                    family = "Grothendieck",
                    role = c("aut", "cre"),
                    email = "ggrothendieck@gmail.com")
as necessary.

Reverse Dependencies (13)

depends

Dependency Network

Dependencies Reverse dependencies proto sqldf MplusAutomation SpecHelpers dartR kanjistat nflseedR priceR smbinning vietnameseConverter HaDeX dartR.popgen lulcc rtf gsubfn

Version History

new 0.7 Mar 10, 2026