A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://davidgohel.github.io/flextable/reference/as_flextable.kmeans.html below:

Transform a 'kmeans' object into a flextable — as_flextable.kmeans • flextable

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 class 'kmeans'
as_flextable(x, digits = 4, ...)
Arguments
x

a kmeans() object

digits

number of digits for the numeric columns

...

unused argument

See also

Other as_flextable methods: as_flextable(), as_flextable.data.frame(), as_flextable.gam(), as_flextable.glm(), as_flextable.grouped_data(), as_flextable.htest(), as_flextable.lm(), as_flextable.merMod(), as_flextable.pam(), as_flextable.summarizor(), as_flextable.table(), as_flextable.tabular(), as_flextable.tabulator(), as_flextable.xtable()

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

           

variable

1

2

3

4

5

withinss

5.4

7.8

12.8

0.7

20.1

size

5

6

7

3

11

mpg*

0.4130

1.6552

-0.0577

-1.3701

-0.6802

cyl*

-1.2249

-1.2249

-0.1050

1.0149

1.0149

disp*

-0.8343

-1.1624

-0.3825

1.8284

0.7580

hp*

-0.8093

-1.0383

-0.3559

1.0207

0.8823

drat*

0.4815

1.2252

-0.0203

-1.0160

-0.5972

wt*

-0.4459

-1.3738

-0.1023

2.1691

0.4256

qsec*

1.2173

0.3076

0.0719

-0.0609

-0.7502

(*) Centers

Total sum of squares: 217.0

Total within-cluster sum of squares: 46.8

Total between-cluster sum of squares: 170.2

BSS/TSS ratio: 78.4%

Number of iterations: 2


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4