Learn R Programming

specmine (version 3.1.6)

kmeans_result_df: Show cluster's members

Description

Show for each cluster from kmeans analysis the sample names belonging to them.

Usage

kmeans_result_df(kmeans.result)

Arguments

kmeans.result

object of class kmeans with the clustering results.

Value

Data frame with the clusters and the samples' names that belong to each one.

Examples

Run this code
# NOT RUN {
  ## Example of showing kmeans cluster's members
  library(specmine.datasets)
  data(cachexia)
  kmeans.result = kmeans_clustering(cachexia, 
		  num.clusters = 4, type = "samples")
  kmeans_result_df(kmeans.result)
# }

Run the code above in your browser using DataLab