R/fitted.tuneclus.R

fitted.tuneclus <- function(object, mth = c("centers", "classes"), ...) 
{
  mth <- match.arg(mth)
  object$clusobjbest$centroid = data.frame(object$clusobjbest$centroid)
  if (mth == "centers") 
    object$clusobjbest$centroid[object$clusobjbest$cluster, , drop = FALSE]
  else object$clusobjbest$cluster
}

Try the clustrd package in your browser

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

clustrd documentation built on May 8, 2019, 5:03 p.m.