Skip to content

Commit

Permalink
fix: support NAs in PeakDensityParam() function
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Apr 30, 2024
1 parent b0d48c4 commit 3f98f0c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/functions-Params.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ CentWavePredIsoParam <- function(ppm = 25, peakwidth = c(20, 50), snthresh = 10,
PeakDensityParam <- function(sampleGroups = numeric(), bw = 30,
minFraction = 0.5, minSamples = 1,
binSize = 0.25, ppm = 0, maxFeatures = 50) {
if (length(sampleGroups) == 0 | any(is.na(sampleGroups)))
stop("Argument 'sampleGroups' has to be defined. It should not ",
"contain 'NA's")
if (length(sampleGroups) == 0)
stop("Argument 'sampleGroups' has to be defined.")
new("PeakDensityParam", sampleGroups = sampleGroups, bw = bw,
minFraction = minFraction, minSamples = minSamples,
binSize = binSize, ppm = ppm, maxFeatures = maxFeatures)
Expand Down

0 comments on commit 3f98f0c

Please sign in to comment.