function ret=npermuter(n,r)
  ret=nchoosek(n,r)*factorial(r);
endfunction
