R Observatory
Search
install.packages("spant")
CRAN checks, method
1 of 13platforms with problems
CRAN 30-day downloads, method
1,020+9.8% up on the 30 days before, the better direction
Test coverage, method
15%of lines run by tests

Tools for reading, visualising and processing Magnetic Resonance Spectroscopy data. The package includes methods for spectral fitting: Wilson (2021) <DOI:10.1002/mrm.28385>, Wilson (2025) <DOI:10.1002/mrm.30462> and spectral alignment: Wilson (2018) <DOI:10.1002/mrm.27605>.

Maintainer
Martin Wilson
Licence
GPL-3
Latest release
2 Oct 2026
First release
26 Apr 2017

Compare with another package

More details
Releases
80
Needs compilation
Yes
Needs R
>= 4.1.0
Config/roxygen2/version
8.0.0
Date
2026-10-02
Language
en-GB
Task views (1)
Subjects (1) Method, Subjects
Cite

Package

Run in R for the authors' entry:

citation("spant")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.21105/joss.03646, 10.1002/mrm.28385, 10.1002/mrm.30462, 10.1002/mrm.27605.

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 spant version 4.5.0 [Data set]. HJJB, LLC. Data release v2026-10-27. https://doi.org/10.5281/zenodo.21843040
About

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

1 of 13 check platforms have warnings or errors.

  • r-oldrel-macos-arm64

    The previous release of R on macOS, arm64

    Error

    Version checked
    4.5.0
    Time taken
    93 s

    re-building of vignette outputs: Error

    Error(s) in re-building vignettes:

    Full output

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

    The unreleased R on Linux, x86_64, debian-clang

    OK

    Version checked
    4.5.0
    Time taken
    297 s
  • r-devel-linux-x86_64-debian-gcc

    The unreleased R on Linux, x86_64, debian-gcc

    OK

    Version checked
    4.5.0
    Time taken
    203 s
  • r-devel-linux-x86_64-fedora-clang

    The unreleased R on Linux, x86_64, fedora-clang

    OK

    Version checked
    4.5.0
    Time taken
    224 s
  • r-devel-linux-x86_64-fedora-gcc

    The unreleased R on Linux, x86_64, fedora-gcc

    OK

    Version checked
    4.5.0
    Time taken
    198 s
  • r-devel-windows-x86_64

    The unreleased R on Windows, x86_64

    OK

    Version checked
    4.5.0
    Time taken
    388 s
  • r-oldrel-macos-x86_64

    The previous release of R on macOS, x86_64

    OK

    Version checked
    4.5.0
    Time taken
    379 s
  • r-oldrel-windows-x86_64

    The previous release of R on Windows, x86_64

    OK

    Version checked
    4.5.0
    Time taken
    451 s
  • r-patched-linux-x86_64

    The patched release of R on Linux, x86_64

    OK

    Version checked
    4.5.0
    Time taken
    289 s
  • r-release-linux-x86_64

    The current release of R on Linux, x86_64

    OK

    Version checked
    4.5.0
    Time taken
    285 s
  • r-release-macos-arm64

    The current release of R on macOS, arm64

    OK

    Version checked
    4.5.0
    Time taken
    82 s
  • r-release-macos-x86_64

    The current release of R on macOS, x86_64

    OK

    Version checked
    4.5.0
    Time taken
    329 s
  • r-release-windows-x86_64

    The current release of R on Windows, x86_64

    OK

    Version checked
    4.5.0
    Time taken
    376 s
  • 1 Error
  • 12 OK
Check output (2)

re-building of vignette outputs, Error on 1 platform

Error(s) in re-building vignettes:
sh: line 1: 57394 Segmentation fault: 11  '/Library/Frameworks/R.framework/Resources/bin/R' --vanilla --no-echo > '/Volumes/Temp/tmp/Rtmprl0lIY/filedc5b5a6d7827' 2>&1 < '/Volumes/Temp/tmp/Rtmprl0lIY/filedc5b48eb76d2'
--- re-building ‘abfit-baseline-opts.Rmd’ using rmarkdown

 *** caught segfault ***
address 0x2, cause 'invalid permissions'

Traceback:
 1: eigen(H_mat_list$H_mat, symmetric = TRUE)
 2: spin_sys(spin_params, ft, ref)
 3: pul_seq(group, ft, ref, ...)
 4: sim_mol(mol_list[[n]], pul_seq, ft, ref, fs, N, xlim, ...)
 5: sim_basis(get_1h_brain_basis_paras(ft = acq_paras$ft, lcm_compat = lcm_compat),     seq_press_ideal, acq_paras = acq_paras, xlim = xlim, TE1 = TE1,     TE2 = TE2)
 6: sim_basis_1h_brain_press(mrs_data)
 7: eval(expr, envir)
 8: eval(expr, envir)
 9: withVisible(eval(expr, envir))
10: withCallingHandlers(code, error = function (e) rlang::entrace(e), message = function (cnd) {    watcher$capture_plot_and_output()    if (on_messa
...[truncated]...
= FALSE, quiet = quiet)        output <- find_vignette_product(name, by = "texi2pdf",             engine = engine)    }}, error = function(e) {    OK <<- FALSE    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",         file, conditionMessage(e)))})
41: tools:::.buildOneVignette("spant-metabolite-simulation.Rmd",     "/Volumes/Builds/packages/big-sur-arm64/results/4.5/spant.Rcheck/vign_test/spant",     TRUE, FALSE, "spant-metabolite-simulation", "UTF-8", "/Volumes/Temp/tmp/Rtmprl0lIY/filedc5b641cf154.rds")
An irrecoverable exception occurred. R is aborting now ...
--- re-building ‘spant-preprocessing.Rmd’ using rmarkdown
2026-10-27 21:50:00.394 R[58178:234015] XType: Using static font registry.
--- finished re-building ‘spant-preprocessing
[cut here]

tests, Error on 1 platform

Running ‘testthat.R’ [1s/1s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(spant)
  spant 4.5.0
  
  Attaching package: 'spant'
  
  The following object is masked from 'package:stats':
  
      sd
  
  > 
  > test_check("spant")
  
   *** caught segfault ***
  address 0x2, cause 'invalid permissions'
  
  Traceback:
   1: eigen(H_mat_list$H_mat, symmetric = TRUE)
   2: spin_sys(spin_params, ft, ref)
   3: pul_seq(group, ft, ref, ...)
   4: sim_mol(mol_list[[n]], pul_seq, ft, ref, fs, N, xlim, ...)
   5: sim_basis(brain_basis_paras, pul_seq, acq_paras, xlim = xlim,     ...)
   6: sim_brain_1h(pul_seq = seq_press_ideal, full_output = TRUE, type = "normal_v1")
   7: eval(code, test_env)
   8: eval(code, test_env)
   9: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) { 
...[truncated]...
conditionMessage(cnd), "\n")    NULL})
  37: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, shuffle = shuffle, error_call = error_call))
  38: test_files_serial(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     desc = desc, load_package = load_package, shuffle = shuffle,     error_call = error_call)
  39: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     load_package = load_package, parallel = 
[cut here]

Check results on CRAN

Total downloads in the last 30 days
1,056+4.4% up on the 30 days before, the better directionIt is the sum of 4 channels: CRAN, r2u, autoCRAN and c2d4u.

CRAN rank

3,602 of 26,529

CRAN

1,020 downloads in the last 30 days

Rank
3,602 of 26,529
Change
+9.8% up on the 30 days before, the better direction

It is in the total. Take it out

r2u

22 downloads in the last 30 days

Rank
4,519 of 30,526
Change
−52.2% down on the 30 days before, the worse direction

It is in the total. Take it out

autoCRAN

4 downloads in the last 30 days

Rank
13,768 of 29,212
Change
−76.5% down on the 30 days before, the worse direction

It is in the total. Take it out

c2d4u, no longer updated

10 downloads in the last 30 days

Rank
1,695 of 7,575
Change
−50% down on the 30 days before, the worse direction

It is in the total. Take it out

Over time

Compare downloads

Needs
20
Dependent packages
0
Suggested by
0
Needs (20)
Installing it adds
33 packages, 47.9 MB of source
Of those, need compilation
25
Optional extras (18)
Functions
691
Public exports
393
Lines of R code
27,423
Median complexity
2
Functions (691)
Size and composition

Lines by kind (42,161)

KindLinesShare
R code27,42365%
Tests1330.3%
Documentation11,40827%
Guides4911%
Compiled code2,7066%

Lines by language

LanguageLinesShare
R27,55665%
Rd11,40827%
Fortran2,6966%
Vignettes4911%
C100%

Languages are counted from file extensions.

Files
517
R functions
679
Compiled functions
12
Object systems
S3: 43 methods
Complexity
Median
2
Mean
4.74
Highest
149
Median lines per function
15
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
679
Calls
1,560
Unconnected
136
Groups
4
Growth (80 releases)
Total lines by release
5,243 on 26 Apr 201742,161 on 2 Oct 2026
Release changes

The tests ran and coverage was measured.

Lines run by tests
15.1%
Expressions run by tests
14.7%
Test cases
9
Exports named in tests
5.9%
Coverage by file (47)
Coverage run
Lines counted
13,100
Lines the tests ran
1,900
Tests passed
Yes
Measured with
covr 3.6.5 on R 4.6.1
Test suite
Has tests
Yes
Test frameworks
testthat
Test cases
9
Lines of tests
133
Test lines per line of code
0
Exports documented
100%
Arguments documented
99.9%
Return value documented
79.3%
Help pages with examples
3.6%
Examples run in checks
73.3%
Guides (5)
Other documentation
README
No
Release notes file
Yes
Help pages
412
Lines of documentation
11,408

martin3141 / spant on github.com

Stars
26no change on 30 days ago
Forks
4
Open issues
0
Last commit
2 Oct 2026
Activity
Commits
2,262
Open pull requests
0
Tagged releases
77
Latest tagged release
v4.5.0, 2 Oct 2026
Issues closed in
1 day (median)
Pull requests closed in
1 day (median)
Pull requests merged
100%
Created
15 Nov 2016
Licence file reads as
GPL-3.0
Development practices (9)
KindFound
Continuous integrationGitHub Actions, R CMD check workflow
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Governance and communityContributing guide
Docs sourceREADME.Rmd, pkgdown
GitHub Pages site last deployed 2026-10-02
pkgdown site last built 2026-10-02
CRAN release processcran-comments.md
Lint, format, editorRStudio project
Git structural.gitattributes

Method, repository practices

Across martin3141

Claude Codeat least 25 crediting itClaude CodeFirst seen 22 May 2026at least 25 crediting it
Claude Opus 5.5Claude Opus 5.51 Oct 2026 to 2 Oct 20265 commits
Claude Sonnet 5Claude Sonnet 51 Sep 2026 to 18 Sep 202620 commits

Tools

ToolFirst seenFoundCommits crediting it
Claude Code22 May 2026Seen in the repositoryCLAUDE.mdNamed in .Rbuildignore.claudeCLAUDE.md25 at least
  • Seen in the repository
  • Named in .Rbuildignore

Models

ModelCommitsFirst commitLast commitCredit lines of
Claude Opus 5.551 Oct 20262 Oct 2026Claude Code
Claude Sonnet 5201 Sep 202618 Sep 2026Claude Code

Across martin3141

R releases
  • On CRAN
  • Release
VersionReleasedR
4.5.0 current2 Oct 20264.6.1
4.4.024 Aug 20264.6.1
4.3.07 Jul 20264.6.1
4.2.020 Jun 20264.6.0
4.1.021 May 20264.6.0
4.0.08 May 20264.6.0
3.9.023 Feb 20264.5.2
3.8.016 Dec 20254.5.2
Earlier versions (72)
VersionReleasedR
3.7.020 Nov 20254.5.2
3.6.022 Sep 20254.5.1
3.5.018 Aug 20254.5.1
3.4.011 Jun 20254.5.0
3.3.028 Mar 20254.4.3
3.2.014 Feb 20254.4.2
3.1.017 Dec 20244.4.2
2.24.014 Nov 20244.4.2
2.23.027 Aug 20244.4.1
2.22.011 Jul 20244.4.1
2.21.030 May 20244.4.0
2.20.01 May 20244.4.0
2.19.022 Mar 20244.3.3
2.18.023 Feb 20244.3.2
2.17.028 Nov 20234.3.2
2.16.023 Oct 20234.3.1
2.15.014 Sep 20234.3.1
2.14.019 Jul 20234.3.1
2.13.026 Jun 20234.3.1
2.12.022 May 20234.3.0
2.11.022 Apr 20234.3.0
2.10.020 Mar 20234.2.3
2.9.03 Mar 20234.2.2
2.7.028 Jan 20234.2.2
2.6.06 Jan 20234.2.2
2.5.06 Dec 20224.2.2
2.4.07 Nov 20224.2.2
2.3.012 Oct 20224.2.1
2.2.08 Sep 20224.2.1
2.1.021 Jul 20224.2.1
2.0.022 Jun 20224.2.0
1.22.027 May 20224.2.0
1.21.03 May 20224.2.0
1.20.030 Mar 20224.1.3
1.19.014 Feb 20224.1.2
1.18.08 Feb 20224.1.2
1.17.07 Jan 20224.1.2
1.16.018 Nov 20214.1.2
1.15.022 Oct 20214.1.1
1.14.023 Jul 20214.1.0
1.13.09 Jun 20214.1.0
1.12.05 May 20214.0.5
1.11.028 Mar 20214.0.4
1.10.06 Jan 20214.0.3
1.9.015 Dec 20204.0.3
1.8.018 Nov 20204.0.3
1.7.010 Jul 20204.0.0
1.6.05 Jun 20204.0.0
1.5.011 May 20204.0.0
1.4.020 Apr 20203.6.3
1.3.03 Apr 20203.6.3
1.2.115 Mar 20203.6.3
1.2.011 Mar 20203.6.3
1.1.01 Mar 20203.6.3
1.0.017 Feb 20203.6.2
0.19.06 Dec 20193.6.1
0.18.011 Nov 20193.6.1
0.16.030 Oct 20193.6.1
0.15.019 Sep 20193.6.1
0.14.028 May 20193.6.0
0.13.025 Apr 20193.5.3
0.12.05 Nov 20183.5.0
0.11.020 Jul 20183.5.0
0.10.025 Jun 20183.5.0
0.9.07 Mar 20183.4.3
0.7.031 Jan 20183.4.3
0.6.025 Oct 20173.4.2
0.5.010 Oct 20173.4.2
0.4.09 Aug 20173.4.1
0.3.020 Jun 20173.4.0
0.2.025 May 20173.4.0
0.1.026 Apr 20173.4.0
Release notes (4.5.0)
  • Bug fix for read_basis_niidir function.
  • Added read_fslmrs_json_basis_dir function.
  • Added get_gaussian_pulse function to replace the misspelled get_guassian_pulse, which is now deprecated.
  • Synced the spant_fit_svs command-line wrapper with fit_svs, adding segment_t1_method, remove_external_basis, pre_align_max_shift, pre_align_ref_freq and pre_align_ref_amp options.
  • Added spant_fit_svs_edited command-line wrapper for fit_svs_edited, and install_cli now installs both command-line scripts.
  • Fixed the --ecc option in the spant_fit_svs and spant_fit_svs_edited command-line wrappers to default to NULL (auto-detect GE eddy current correction) rather than always forcing FALSE.
  • Fixed a broken shebang line in the command-line scripts generated by install_cli, which caused "No such file or directory" errors on Linux.
  • Replaced the non-functional tcltk fit_svs_gui() prototype with a working Shiny/miniUI gadget for running fit_svs interactively, and exported it.
  • Added spant_fit_svs_gui command-line wrapper to launch fit_svs_gui, installed alongside the other scripts by install_cli.
  • Fixed gen_numeric_reg silently overwriting the time column when the name argument was missing. It now stops if name is missing, not a single character string, or equal to "time".
  • gen_trap_reg, gen_bold_reg, gen_conv_reg and gen_impulse_reg now stop if trial_type contains "time", which previously created a duplicate time column that was silently dropped by glm_spec.