R Observatory
Search
install.packages("gsubfn")
CRAN checks, method
OKnotes on 2 of 13
CRAN 30-day downloads, method
17,663−2.7% down on the 30 days before, the worse direction

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.

Full 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.

Maintainer
G. Grothendieck
Licence
GPL (>= 2)
Latest release
16 Mar 2018
First release
27 Mar 2006

Compare with another package

More details
Releases
25
Needs compilation
No
Date
2018-03-15
Task views (1)
Subjects (1) Method, Subjects
Cite

Package

Run in R for the authors' preferred citation:

citation("gsubfn")

R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA
Balamuta, J. J. (2026). R Observatory: Metrics for gsubfn version 0.7 [Data set]. HJJB, LLC. Data release v2026-10-29. https://doi.org/10.5281/zenodo.21843040
About

From data release v2026-10-29, which the citation names so these numbers can be found later.

No warnings or errors. 2 of 13 check platforms have notes.

  • r-devel-linux-x86_64-debian-clang

    The unreleased R on Linux, x86_64, debian-clang

    Note

    Version checked
    0.7
    Time taken
    39 s

    CRAN incoming feasibility: Note

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

    Full output

  • r-devel-linux-x86_64-debian-gcc

    The unreleased R on Linux, x86_64, debian-gcc

    Note

    Version checked
    0.7
    Time taken
    36 s

    CRAN incoming feasibility: Note

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

    Full output

  • r-devel-linux-x86_64-fedora-clang

    The unreleased R on Linux, x86_64, fedora-clang

    OK

    Version checked
    0.7
    Time taken
    29 s
  • r-devel-linux-x86_64-fedora-gcc

    The unreleased R on Linux, x86_64, fedora-gcc

    OK

    Version checked
    0.7
    Time taken
    33 s
  • r-devel-windows-x86_64

    The unreleased R on Windows, x86_64

    OK

    Version checked
    0.7
    Time taken
    76 s
  • r-oldrel-macos-arm64

    The previous release of R on macOS, arm64

    OK

    Version checked
    0.7
  • r-oldrel-macos-x86_64

    The previous release of R on macOS, x86_64

    OK

    Version checked
    0.7
    Time taken
    61 s
  • r-oldrel-windows-x86_64

    The previous release of R on Windows, x86_64

    OK

    Version checked
    0.7
    Time taken
    75 s
  • r-patched-linux-x86_64

    The patched release of R on Linux, x86_64

    OK

    Version checked
    0.7
    Time taken
    34 s
  • r-release-linux-x86_64

    The current release of R on Linux, x86_64

    OK

    Version checked
    0.7
    Time taken
    34 s
  • r-release-macos-arm64

    The current release of R on macOS, arm64

    OK

    Version checked
    0.7
    Time taken
    18 s
  • r-release-macos-x86_64

    The current release of R on macOS, x86_64

    OK

    Version checked
    0.7
    Time taken
    59 s
  • r-release-windows-x86_64

    The current release of R on Windows, x86_64

    OK

    Version checked
    0.7
    Time taken
    76 s
  • 2 Note
  • 11 OK
Check output (1)

CRAN incoming feasibility, Note on 2 platforms

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 results on CRAN

Total downloads in the last 30 days
19,566+1.5% up on the 30 days before, the better directionIt is the sum of 6 channels: CRAN, r2u, autoCRAN, conda-forge, Bioconda and c2d4u.

CRAN rank

834 of 26,553

CRAN

17,663 downloads in the last 30 days

Rank
834 of 26,553
Change
−2.7% down on the 30 days before, the worse direction

It is in the total. Take it out

r2u

695 downloads in the last 30 days

Rank
992 of 30,526
Change
+130% up on the 30 days before, the better direction

It is in the total. Take it out

autoCRAN

191 downloads in the last 30 days

Rank
275 of 29,233
Change
−6.4% down on the 30 days before, the worse direction

It is in the total. Take it out

conda-forge

976 downloads in the last 30 days

Rank
1,030 of 3,828
Change
+66% up on the 30 days before, the better direction

It is in the total. Take it out

Bioconda

19 downloads in the last 30 days

Rank
4,235 of 4,976
Change
−5% down on the 30 days before, the worse direction

It is in the total. Take it out

c2d4u, no longer updated

22 downloads in the last 30 days

Rank
823 of 7,575
Change
+69.2% up on the 30 days before, the better direction

It is in the total. Take it out

Over time

Compare downloads

Needs
1
Dependent packages
9
Suggested by
5
Needs (1)
Installing it adds
1 package, 529 KB of source
Of those, need compilation
0
Optional extras (8)
Dependent packages (9)
PackageTitleDownloads in 30 days
sqldfManipulate R Data Frames Using SQL15,963
MplusAutomationAn R Package for Facilitating Large-Scale Latent Variable Analyses in Mplus6,345
smbinningScoring Modeling and Optimal Binning1,506
dartRImporting and Analysing 'SNP' and 'Silicodart' Data Generated by Genome-Wide Restriction Fragment Analysis973
priceREconomics and Pricing Tools711
nflseedRFunctions to Efficiently Simulate and Evaluate NFL Seasons598
kanjistatA Statistical Framework for the Analysis of Japanese Kanji Characters402
SpecHelpersSpectroscopy Related Utilities274
vietnameseConverterConvert Vietnamese Encodings252
Functions
15
Public exports
12
Lines of R code
602
Median complexity
4
Functions (15)
Size and composition

Lines by kind (2,174)

KindLinesShare
R code60228%
Documentation74634%
Guides82638%

Lines by language

LanguageLinesShare
Vignettes82638%
Rd74634%
R60228%

Languages are counted from file extensions.

Files
39
R functions
15
Object systems
S3: 3 methods
Complexity
Median
4
Mean
9.07
Highest
36
Median lines per function
21
About complexity

Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.

Call graph figures
R functions
15
Calls
13
Unconnected
4
Groups
1
Growth (25 releases)
Total lines by release
146 on 24 Mar 20062,174 on 16 Mar 2018
Release changes

The package was built and has no tests to run.

Test cases
1
Lines of tests
0
Exports named in tests
0%
Test suite
Has tests
No
Test frameworks
RUnit, svUnit
Test cases
1
Test lines per line of code
0
Exports documented
100%
Return value documented
0%
Help pages with examples
100%
Examples run in checks
100%
Guides (1)
Other documentation
README
No
Release notes file
Yes
Help pages
9
Lines of documentation
746

ggrothendieck / gsubfn on github.com

Stars
11
Forks
0
Open issues
3
Last commit
15 Mar 2018
Activity
Commits
100
Open pull requests
0
Tagged releases
0
Latest tagged release
–
Issues closed in
2 days (median)
Pull requests closed in
–
Pull requests merged
–
Created
26 May 2015
Licence file reads as
GPL-2.0
R releases
  • On CRAN
  • Release
VersionReleasedR
0.7 current16 Mar 20183.4.4
0.6-627 Aug 20143.1.1
0.6-522 Oct 20122.15.1
0.6-41 Aug 20122.15.1
0.6-33 Apr 20122.15.0
0.6-228 Mar 20122.14.2
0.5-77 Jun 20112.13.0
0.5-518 Nov 20102.12.0
Earlier versions (17)
VersionReleasedR
0.5-313 Jun 20102.11.1
0.5-223 Mar 20102.10.1
0.5-116 Mar 20102.10.1
0.5-02 Jul 20092.9.1
0.3-815 Dec 20082.8.0
0.3-717 Oct 20082.7.2
0.3-328 Oct 20062.4.0
0.3-123 Oct 20062.4.0
0.2-215 Oct 20062.4.0
0.2-110 Oct 20062.4.0
0.2-06 Oct 20062.4.0
0.1-51 Oct 20062.3.1
0.1-423 Aug 20062.3.1
0.1-323 Apr 20062.2.1
0.1-218 Apr 20062.2.1
0.1-15 Apr 20062.2.1
0.1-027 Mar 20062.2.1