rprops / Phenoflow_package

R package offering functionality for the advanced analysis of microbial flow cytometry data
GNU General Public License v2.0
9 stars 5 forks source link

RandomF_FCS throws warnings when more than 1 dash occurs in the selected params (e.g. PerCP-Cy5.5-A) #55

Closed FMKerckhof closed 6 years ago

FMKerckhof commented 6 years ago

RandomF_FCS throws warnings when more than 1 dash occurs in the selected params (e.g. PerCP-Cy5.5-A). This is specifically due to

add_measuredparam <- unique(do.call(rbind, strsplit(param,"-"))[, 2])[1]

The warning that is returned is:

Warning message:
In (function (..., deparse.level = 1)  :  number of columns of result is not a multiple of vector length (arg 1)

Whereas this (luckily) still returns the desired parameter in the current cases this is rather unpredictable behaviour, that we should circumvent. As a suggestion maybe we should rather grep (greedily) or use a final character anchor like .*-[AWH]$ or .*-[A-Z]$ to be more generic?