Displaying 1 result from an estimated 1 matches for "outcomes_contain".
Did you mean:
outcomes_container
2010 Nov 17
1
efficient conversion of matrix column rows to list elements
...){list(x)}
pb <-
ProgressBar(max=length(outcomes),stepLength=1,newlineWhenDone=TRUE)
for (i in 2:length(outcomes)){
increase(pb)
outcomes_ <- apply(combn(outcomes,i),2,column2list)
for (j in 1:length(outcomes_)){outcomes_[[j]] <-
outcomes_[[j]][[1]]}
outcomes_container <- mclapply(outcomes_,prod,mc.cores=3)
intsctn[i] <- sum(unlist(outcomes_container))
}
intsctn <- intsctn[-1]
return(sum(outcomes) - sum(intsctn[which(which((intsctn %in% intsctn))
%% 2 == 1)]) + sum(intsctn[which(which((intsctn %in% intsctn)) %% 2 == 0)])
+ ((-1)^len...