BASE 1 to Clustering

PASO 1 Archvio Base

Descarga el archivo de abajo para empezar tu proyecto :

PASO 2 Código

Deberas correr los chuncks de abajo para empezar el proyecto :

set.seed(351)
df <- USArrests
murder3 <- df[sample(nrow(df), 45),]
rm(df)

This data set contains statistics, in arrests per 100000 residents for assault, murder, and rape in each of the 50 US states in 1973

# Also given is the percent of the population living in urban areas.

A data frame with 45 observations on 4 variables.
[,1]    Murder  numeric Murder arrests (per 100,000)
[,4]    Rape    numeric Rape arrests (per 100,000)
[,3]    UrbanPop    numeric Percent urban population
[,4]    Rape    numeric Rape arrests (per 100,000)

Escalamos la base y usaremos murder4

murder4 <- as.data.frame(scale(murder3))