Skip to content

Commit

Permalink
fix: bug in read_shimadzu (decimal separator)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbass committed Jan 10, 2024
1 parent a50105e commit 0f39809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/read_shimadzu_ascii.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ read_shimadzu_chromatogram <- function(file, x, chrom.idx, sep, data_format,
read_metadata, format_out){
header <- try(extract_shimadzu_header(x = x, chrom.idx = chrom.idx, sep = sep))
met <- header[[1]]
first_time <- strsplit(x[header[[2]]+2], "\t")[[1]][1]
first_time <- strsplit(x[header[[2]]+2], split = sep)[[1]][1]
decimal_separator <- ifelse(grepl(",", first_time), ",", ".")

if (decimal_separator == ","){
Expand Down Expand Up @@ -236,7 +236,7 @@ read_shimadzu_dad <- function(file, x, chrom.idx, sep, data_format,
read_metadata, format_out){
header <- try(extract_shimadzu_header(x = x, chrom.idx = chrom.idx, sep = sep))
met <- header[[1]]
first_time <- strsplit(x[header[[2]]+3], "\t")[[1]][1]
first_time <- strsplit(x[header[[2]]+3], split = sep)[[1]][1]
decimal_separator <- ifelse(grepl(",", first_time), ",", ".")

if (decimal_separator == ","){
Expand Down

0 comments on commit 0f39809

Please sign in to comment.