From 32bc6dd506399f43f81f1a79744ae09a6e86508d Mon Sep 17 00:00:00 2001 From: mikejiang Date: Thu, 1 Aug 2019 11:49:39 -0700 Subject: [PATCH] set dataset argument if it is absent to avoid redundant warning messages #47 --- R/ncdfIO.R | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/R/ncdfIO.R b/R/ncdfIO.R index bf56681..1bb7ea7 100644 --- a/R/ncdfIO.R +++ b/R/ncdfIO.R @@ -169,6 +169,8 @@ read.ncdfFlowSet <- function(files = NULL } }else chnls_common <- channels + #set dataset argument if it is absent to avoid redundant warning messages + dots[["dataset"]] <- ifelse("dataset" %in% names(dots), dots[["dataset"]], 1) thisCall <- quote(read.FCSheader(files[1])) thisCall <- as.call(c(as.list(thisCall),dots)) @@ -244,11 +246,14 @@ read.ncdfFlowSet <- function(files = NULL my.read.FCS <- function(i) { curFile<-files[i] - this_fr <- read.FCS(curFile - ,column.pattern = colPattern - , alter.names = alter.names - , channel_alias = channel_alias - ,...) + thisCall <- quote(read.FCS(curFile + ,column.pattern = colPattern + , alter.names = alter.names + , channel_alias = channel_alias + ) + ) + thisCall <- as.call(c(as.list(thisCall),dots)) + this_fr <- eval(thisCall) #we need to reorder columns in order to make them identical across samples this_fr[,chnls_common] }