Table of Contents
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))
BASE 2 to Clustering
PASO 1 Archvios Base
Descarga los archivos de abajo para empezar tu proyecto :
Baja ambos archivos para él proyecto
PASO 2 Datos Carga
CORRE este chunk para Cargar los Datos
Datos de diferentes auto del modelo Audi, se busca ver si es posible agrupar los modelos de autos
fuel2 <- read.csv("combustible.csv")
fuel2$Carrocería <- NULL
fuel2$Caja_cambios <- NULL
fuel2$Marchas <- NULL
fuel2$Combustible <- NULL
boxplot(fuel2,main="las variables NO ESTAN en el mismo RANGO !! ")

NOMBRES DE LAS VARIABLES DEL DATASET
names(fuel2)
nombres
## [1] "Velocidad_max" "Diámetro_cilindro" "Recorrido_pistón"
## [4] "Potencia_motor" "Cilindrada"
Escalamos la base y usaremos fuel3
fuel3 <- as.data.frame(scale(fuel2))
boxplot(fuel3,main="Ahora todas las variables están en el mismo rango !! ")

BASE 3 to Clustering
PASO 1
CORRE este chunk para Cargar los Datos
url = "http://www.biz.uiowa.edu/faculty/jledolter/DataMining/protein.csv"
food <- read.csv(url)
rownames(food) <- food$Country
food$Country <- NULL
names(food)
Nombres de las variables
## [1] "RedMeat" "WhiteMeat" "Eggs" "Milk" "Fish" "Cereals"
## [7] "Starch" "Nuts" "Fr.Veg"
Paso 2
nivel de las variables
boxplot(food)

escalamiento de las variables
food2 <- as.data.frame(scale(food))
boxplot(food2)
