Open saramortara opened 5 years ago
currently the selection is peformed by subsetting an index vector
sel.index <- 1:n.part
sel.index <- which(stats.algo[, select_par] >= select_par_val)
this vector is then used to subset many portions of the following code tipo:
pond.stats <- stats.algo[, weight_par][sel.index]
to subset with an expression an option would be to use subset()
, that receives an expression
select_expression = "TSS > 0.7"
base::subset(stats.algo, subset = select_expression)
and solve for the rest of the subsets or re-create the sel.index index, but still, an expression in the parameters is a character string that should be evaluated (there are many options for doing this, I was looking here)
in cases that the user may want something like 0.7 <TSS < 1 or TSS > 0.7 & pval_pROC > 0.05?