From ed732fea6f7a7cb7d6eae64c5bfc624aa3b39892 Mon Sep 17 00:00:00 2001 From: Natalie-Winans Date: Tue, 5 Jul 2022 13:07:21 -0700 Subject: [PATCH] fixed tibble issue in as.ftmsData --- R/as.ftmsData.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/as.ftmsData.R b/R/as.ftmsData.R index a060d7c..d74f4c6 100644 --- a/R/as.ftmsData.R +++ b/R/as.ftmsData.R @@ -92,11 +92,11 @@ as.peakData <- function(e_data, f_data, e_meta, edata_cname, fdata_cname, mass_c aroma_cname = NULL, modaroma_cname = NULL, dbe_cname = NULL, dbeo_cname = NULL, dbeai_cname = NULL, elcomp_cname = NULL, instrument_type = "12T", data_scale = "abundance", check_rows = FALSE){ - - # check that e_data, f_data, and e_meta are data.frames # - if(!inherits(e_data, "data.frame")) stop("e_data must be of the class 'data.frame'") - if(!inherits(f_data, "data.frame")) stop("f_data must be of the class 'data.frame'") - if(!inherits(e_meta, "data.frame")) stop("e_meta must be of the class 'data.frame'") + + # make sure e_data, f_data, and e_meta are data.frames # + e_data <- as.data.frame(e_data) + f_data <- as.data.frame(f_data) + e_meta <- as.data.frame(e_meta) # check that the peak column exists in e_data and e_meta (if applicable) # if(!(edata_cname %in% names(e_data))) stop(paste("Peak/Mass column ", edata_cname," not found in e_data. See details of as.peakData for specifying column names.", sep = ""))