R/fitted.clusmca.R

fitted.clusmca <- function(object, mth = c("centers", "classes"), ...) 
{
  mth <- match.arg(mth)
  # object$centroid = data.frame(object$centroid)
  if (mth == "centers") 
    if (object$centroid != 0) {
      object$centroid[object$cluster, , drop = FALSE]
    } else {
      object$centroid[object$cluster]
    }
  else {
    if (object$centroid != 0) {
      object$cluster 
    } else {
      object$centroid[object$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.