Skip to content

Commit

Permalink
fix previous verification
Browse files Browse the repository at this point in the history
  • Loading branch information
lgatto committed Nov 6, 2023
1 parent da115ab commit c766fc7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/readWriteMgfData.R
Expand Up @@ -159,13 +159,14 @@ readMgfData <- function(filename,
if (verbose)
close(pb)

fdata <- do.call(rbind, fdata)

## This checks that the headers are all the same
fdn <- sapply(fdata, names, simplify = FALSE)
fdn1 <- fdn[[1]]
for (i in fdn)
stopifnot(identical(fdn1, i), "Ion headers identical.")
if (!all(sapply(fdn, function(x) identical(x, fdn1)))) {
stop("Ion headers identical.")
}

fdata <- do.call(rbind, fdata)

names(spectra) <- paste0("X", seq_along(spectra))
assaydata <- list2env(spectra)
Expand Down

0 comments on commit c766fc7

Please sign in to comment.