Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new spectraVariableMapping<- generic #352

Merged
merged 2 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Spectra
Title: Spectra Infrastructure for Mass Spectrometry Data
Version: 1.17.6
Version: 1.17.7
Description: The Spectra package defines an efficient infrastructure
for storing and handling mass spectrometry spectra and functionality to
subset, process, visualize and compare spectra data. It provides different
Expand Down
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export(ppm)
export(processingLog)
export(reduceSpectra)
export(scalePeaks)
export(spectraVariableMapping)
exportClasses(MsBackend)
exportClasses(MsBackendCached)
exportClasses(MsBackendDataFrame)
Expand Down Expand Up @@ -63,6 +62,7 @@ exportMethods("rtime<-")
exportMethods("smoothed<-")
exportMethods("spectraData<-")
exportMethods("spectraNames<-")
exportMethods("spectraVariableMapping<-")
exportMethods(Spectra)
exportMethods(acquisitionNum)
exportMethods(addProcessing)
Expand Down Expand Up @@ -143,6 +143,7 @@ exportMethods(smooth)
exportMethods(smoothed)
exportMethods(spectraData)
exportMethods(spectraNames)
exportMethods(spectraVariableMapping)
exportMethods(spectraVariables)
exportMethods(spectrapply)
exportMethods(split)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Spectra 1.17

## Change in 1.17.7

- Add the `spectraVariableMapping<-` generic method.

## Change in 1.17.6

- Add new `fillCoreSpectraVariables()` function that allows to add eventually
Expand Down
12 changes: 11 additions & 1 deletion R/AllGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,22 @@ setGeneric("Spectra", function(object, ...) standardGeneric("Spectra"))
#'
#' @param ... Optional parameters.
#'
#' @param value For `spectraVariableMapping<-`: a named `character` vector.
#'
#' @return A named `character` with names being spectra variable names (use
#' [spectraVariables()] for a list of supported names) and values being the
#' data field names.
#'
#' @author Johannes Rainer
#'
#' @export
#' @name spectraVariableMapping
#'
#' @exportMethod spectraVariableMapping
setGeneric("spectraVariableMapping", function(object, ...)
standardGeneric("spectraVariableMapping"))

#' @rdname spectraVariableMapping
#'
#' @exportMethod spectraVariableMapping<-
setGeneric("spectraVariableMapping<-", function(object, ..., value)
standardGeneric("spectraVariableMapping<-"))
5 changes: 5 additions & 0 deletions man/spectraVariableMapping.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading