From d7faa83fcc4935c3e3fa37b3e68cc9760cc04878 Mon Sep 17 00:00:00 2001 From: Ethan Bass Date: Sat, 14 Dec 2024 15:10:10 -0500 Subject: [PATCH] fix: use interval encoded in file to calculate LCD retention times not `500` --- R/read_shimadzu_lcd.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/read_shimadzu_lcd.R b/R/read_shimadzu_lcd.R index ec36998..dfe97fd 100644 --- a/R/read_shimadzu_lcd.R +++ b/R/read_shimadzu_lcd.R @@ -390,10 +390,10 @@ read_sz_chrom <- function(path, stream){ f <- file(path_raw, "rb") on.exit(close(f)) dat <- data.frame(intensity = decode_sz_block(f)) - seek(f,4) - seek(f,4) - interval <- readBin(f, "integer", size = 4,endian = "little") - times <- seq(from = 0, by = 500, length.out=nrow(dat))/60000 + seek(f, 4) + seek(f, 4) + interval <- readBin(f, "integer", size = 4, endian = "little") + times <- seq(from = 0, by = interval, length.out = nrow(dat))/60000 rownames(dat) <- times dat }