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

20.8K

Last 30 days

836th

61.6K

Last 90 days

271.1K

Last year

Trend: +2.2% (30d vs prior 30d)

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 (2 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.

Check History

NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 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 (14)

depends

Dependency Network

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

Version History

new 0.7 Mar 10, 2026
updated 0.7 ← 0.6-6 diff Mar 15, 2018
updated 0.6-6 ← 0.6-5 diff Aug 26, 2014
updated 0.6-5 ← 0.6-4 diff Oct 21, 2012
updated 0.6-4 ← 0.6-3 diff Jul 31, 2012
updated 0.6-3 ← 0.6-2 diff Apr 2, 2012
updated 0.6-2 ← 0.5-7 diff Mar 27, 2012
updated 0.5-7 ← 0.5-5 diff Jun 6, 2011
updated 0.5-5 ← 0.5-3 diff Nov 17, 2010
updated 0.5-3 ← 0.5-2 diff Jun 12, 2010
updated 0.5-2 ← 0.5-1 diff Mar 22, 2010
updated 0.5-1 ← 0.5-0 diff Mar 15, 2010
updated 0.5-0 ← 0.3-8 diff Jul 1, 2009
updated 0.3-8 ← 0.3-7 diff Dec 14, 2008
updated 0.3-7 ← 0.3-3 diff Oct 16, 2008
updated 0.3-3 ← 0.3-1 diff Oct 27, 2006
updated 0.3-1 ← 0.2-2 diff Oct 22, 2006
updated 0.2-2 ← 0.2-1 diff Oct 14, 2006
updated 0.2-1 ← 0.2-0 diff Oct 9, 2006
updated 0.2-0 ← 0.1-5 diff Oct 5, 2006