subsets <- function(k) { subsets <- expand.grid(rep(list(0:1),k)) ad <- apply(subsets,1,sum) subsets[order(ad)[-1],] }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.