kmeans_result_df: Show cluster's members

Description Usage Arguments Value Examples

View source: R/clustering.R

Description

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

Usage

1
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

1
2
3
4
5
6
  ## 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)

specmine documentation built on Sept. 21, 2021, 5:06 p.m.