R/nchoosek.R

Defines functions nchoosek

Documented in nchoosek nchoosek

nchoosek = function(cs , k) {  #i can also pass the compFun arg for selecting
  if (length(cs) == 1) { #if not vector
    res = choose(cs, k); #or nchoosek
  } else  res = combn(cs, k)
  res;
}

Try the MXM package in your browser

Any scripts or data that you put into this service are public.

MXM documentation built on Aug. 25, 2022, 9:05 a.m.