R/findk.R

Defines functions findk

findk <- function(set,f,k) {
  f <- droplevels(factor(f))
  n <- table(droplevels(factor(f)))
  if (k>min(n)) {k <- min(n)}
  spl <- splitf(set,f,k)
  if (k!=length(spl)) {k <- length(spl)}
  return(k)
}

Try the RVAideMemoire package in your browser

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

RVAideMemoire documentation built on Nov. 6, 2023, 5:07 p.m.