Rmstoolkitlib provides an R interface to the MSToolkit library for reading raw mass spectrometry data.
install.packages('Rmstoolkitlib', repos = c('https://rickhelmus.r-universe.dev', 'https://cloud.r-project.org'))
# Install the package from the source repository
remotes::install_github("rickhelmus/Rmstoolkitlib")
If you face errors during installation it may be due to temporary installation paths with spaces in them (especially common on Windows). As a workaround, you can tempoerarily change the TMPDIR environment variable during package installation. For instance:
tmpBuildDir <- "C:/Rtmp"
oldTmpDir <- Sys.getenv("TMPDIR")
dir.create(tmpBuildDir, showWarnings = FALSE)
Sys.setenv(TMPDIR = tmpBuildDir)
remotes::install_github("rickhelmus/Rmstoolkitlib")
Sys.setenv(TMPDIR = oldTmpDir) # Reset TMPDIR to its original value
For more information, refer to the original MSToolkit project:
https://github.com/mhoopmann/mstoolkit
Rmstoolkitlib to Imports or Suggests (not LinkingTo) in your package DESCRIPTION file.src/Makevars and/or src/Makevars.win file:PKG_CXXFLAGS += $(shell echo 'Rmstoolkitlib::pkgconfig("PKG_CXXFLAGS")' | "${R_HOME}/bin/R" --vanilla --slave)
PKG_LIBS += $(shell echo 'Rmstoolkitlib::pkgconfig("PKG_LIBS")' | "${R_HOME}/bin/R" --vanilla --slave)
Feel free to contribute or raise issues on the repository.