Skip to content

Commit

Permalink
fix check_chr error message to reflect new argument name
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbass committed Aug 22, 2024
1 parent fa65460 commit fc42e4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ get_lambda_idx <- function(lambda, lambdas, y, allow_max = TRUE){
check_chr <- function(chr, loc = NULL, peak_table, chrom_list, allow_max = TRUE){
if (chr == 'max'){
if (allow_max){
chr <- which.max(peak_table$tab[,loc])
chr <- which.max(peak_table$tab[, loc])
} else{
stop("Chromatogram must be specified for scan function.")
}
}
if (is.character(chr) & !(chr %in% names(chrom_list))){
stop("Chromatogram not found. Check `chr` argument!")
stop("Chromatogram not found. Please check `idx` argument and try again!")
}
chr
}
Expand Down

0 comments on commit fc42e4e

Please sign in to comment.