Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Commit 6c9add10 authored by joerg.buescher's avatar joerg.buescher
Browse files

bugfix for plot_peaks in case no peak was found

parent 653982fb
......@@ -35,8 +35,11 @@ plot_peaks <- function(metab, smpl, msd, prm) {
}
}
ylim12 <- c(0, max(c(100, 1.1 * msd[[im]][[id]]$height, 1.1 * msd[[im]][[id]]$height12),na.rm = TRUE) )
ylim13 <- c(0, max(c(120, 1.4 * msd[[im]][[id]]$height13)))
nowheight <- c(msd[[im]][[id]]$height, msd[[im]][[id]]$height12, msd[[im]][[id]]$height13)
nowheight[is.na(nowheight)] <- 0
nowheight[is.infinite(nowheight)] <- 0
ylim12 <- c(0, max(c(100, 1.1 * nowheight[1:2],na.rm = TRUE) ))
ylim13 <- c(0, max(c(120, 1.4 * nowheight[3])))
if (sum(nowgoody) < 2) {
nowgoodplot <- FALSE
......
......@@ -184,7 +184,7 @@ process_batch <- function(nowfolder = "", parameters = list(), return_msd=FALSE)
par(pardefault)
# Return msd object if argument is set
if(return_msd){
if (return_msd){
msd
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment