I have 2 problems:
to design a dynamic R code function that receives a parameters
N
(integer) andL
(list of characters) and do the following: construct a predicate with OR operators dynamically as the number N. For instance, if N=2, the predicate would be:data.clean.test[j,c(L[[1]])] == TRUE OR data.clean.test[j,c(L[[2]])]
or if N=3 it would bedata.clean.test[j,c(L[[1]])] == TRUE OR data.clean.test[j,c(L[[2]])] == TRUE OR data.clean.test[j,c(L[[3]])] == TRUE
and so on...select top N results from an un sorted list of decimals (probabilities between 0 and 1)
any ideas ? this is not homework but a real predictive analysis use case...