R/data.r

Defines functions olive_example

Documented in olive_example

#' Example clusterfly object created with olives data
#'
#' @keywords dataset
#' @export
olive_example <- function() {
  ol <- clusterfly(olives[, -(1:3)], olives[, 2:3])
  ol <- cfly_cluster(ol, kmeans, 3, name="kmeans")
  ol <- cfly_cluster(ol, kmeans, 4, name="k4-1")
  ol <- cfly_cluster(ol, kmeans, 4, name="k4-2")
  ol <- cfly_cluster(ol, kmeans, 4, name="k4-3")
  ol[["Region"]] <- olives$Region
  ol[["Area"]] <- olives$Area

  ol
}

Try the clusterfly package in your browser

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

clusterfly documentation built on May 2, 2019, 9:12 a.m.