Learn R Programming

flextable (version 0.7.2)

as_flextable.kmeans: tabular summary for kmeans

Description

produce a flextable describing a kmeans object. The function is only using package 'broom' that provides the data presented in the resulting flextable.

Usage

# S3 method for kmeans
as_flextable(x, digits = 4, ...)

Arguments

x

a kmeans() object

digits

number of digits for the numeric columns

...

unused argument

Examples

Run this code
if(require("stats")){
  cl <- kmeans(scale(mtcars[1:7]), 5)
  ft <- as_flextable(cl)
  ft
}

Run the code above in your browser using DataLab