setNoiseLevels: A function for setting and plotting noise levels.

View source: R/mrbin.R

setNoiseLevelsR Documentation

A function for setting and plotting noise levels.

Description

This function reads parameters from the global variable mrbin.env$mrbin$parameters and plots exemplary spectra and respective noise levels. Plots will be saved if saveFiles is set to "Yes".

Usage

setNoiseLevels(
  mrbinObject,
  plotOnly = FALSE,
  showSpectrumPreview = NULL,
  silent = FALSE
)

Arguments

mrbinObject

An mrbin object

plotOnly

Should only noise plots be generated (TRUE), or should noise levels be adjusted interactively (FALSE)

showSpectrumPreview

Should plots be shown? If not provided, this value will be taken from the mrbin object parameters

silent

If set to TRUE, plots will not be shown but might still be saved

Value

An invisible mrbin object

Examples

 mrbinObject<-mrbin(silent=TRUE,
                   parameters=list(verbose=TRUE,dimension="1D",PQNScaling="No",
                   binwidth1D=0.04,signal_to_noise1D=1,PCA="No",binRegion=c(9.5,0.5,10,156),
                   saveFiles="No",referenceScaling="No",noiseRemoval="No",
                   fixNegatives="No",logTrafo="No",noiseThreshold=.05,tryParallel=FALSE,
                   NMRfolders=c(system.file("extdata/2/10/pdata/10",package="mrbin"),
                              system.file("extdata/3/10/pdata/10",package="mrbin"))
                   ))
 mrbinObject<-setNoiseLevels(mrbinObject,plotOnly=TRUE)

mrbin documentation built on April 11, 2023, 6:05 p.m.