Skip to content

Commit 17a9c57

Browse files
committed
Coerce score via character to handle factor inputs
1 parent 7ec49d1 commit 17a9c57

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

R/clean_MZMine.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
stop("mzmine_annotations is missing required column(s): ",
5353
paste(missing_ann, collapse = ", "), ".")
5454
}
55-
ann[, score := suppressWarnings(as.numeric(score))]
55+
ann[, score := suppressWarnings(as.numeric(as.character(score)))]
5656
if (anyNA(ann$score)) {
5757
stop("mzmine_annotations$score must be numeric (or coercible to numeric).")
5858
}

0 commit comments

Comments
 (0)