From 4d4653d463088d3da7d1ce7efce5224bdfb207ca Mon Sep 17 00:00:00 2001 From: jorainer Date: Tue, 3 Oct 2023 08:11:26 +0200 Subject: [PATCH] Fix vignette problem --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ vignettes/MetaboAnnotation.Rmd | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4c8c7b0..82ee748 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: MetaboAnnotation Title: Utilities for Annotation of Metabolomics Data -Version: 1.4.2 +Version: 1.4.3 Description: High level functions to assist in annotation of (metabolomics) data sets. These include functions to perform simple tentative annotations based on diff --git a/NEWS.md b/NEWS.md index 66905ce..bb97acc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # MetaboAnnotation 1.4 +## Changes in 1.4.3 + +- Fix `addProcessing` example in the vignette. + ## Changes in 1.4.2 - Import `query` from `AnnotationHub`. diff --git a/vignettes/MetaboAnnotation.Rmd b/vignettes/MetaboAnnotation.Rmd index 40b6402..a64d946 100644 --- a/vignettes/MetaboAnnotation.Rmd +++ b/vignettes/MetaboAnnotation.Rmd @@ -490,10 +490,11 @@ scaling function to both the query and target spectra and plot the spectra again afterwards (see the help for `addProcessing` in the `Spectra` package for more details on spectra data manipulations). This function will replace the absolute spectra intensities with intensities relative to the -maximum intensity of each spectrum. +maximum intensity of each spectrum. Note that functions for `addProcessing` need +to have (like in the example below) the `...` parameter. ```{r} -scale_int <- function(x) { +scale_int <- function(x, ...) { x[, "intensity"] <- x[, "intensity"] / max(x[, "intensity"], na.rm = TRUE) x }