Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions R/as.ftmsData.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""))
Expand Down