K-means clustering of Animal’s milk

forhad

1/5/2020

Introduction

Here is a look of the dataset:

##        name water protein fat lactose  ash
## 1     Horse  90.1     2.6 1.0     6.9 0.35
## 2 Orangutan  88.5     1.4 3.5     6.0 0.24
## 3    Monkey  88.4     2.2 2.7     6.4 0.18

Code ui

numericInput('clusters', 'Cluster count', 1, min = 1, max = 9)

Code server

clusters <- reactive({
       kmeans(selectedData(), input$clusters)

Published on Shiny