Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed tibble issue in as.ftmsData #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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