bd <- read.csv("/Users/chema/Downloads/FORM - Delivery Plan.xlsx - DELIVERY PLAN.csv")
#Entender la base de datos
summary(bd)
## CLIENTE.PLANTA PROYECTO ID.ODOO ITEM
## Length:231 Length:231 Length:231 Length:231
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## JUNIO JULIO AGOSTO SEPTIEMBRE
## Min. : 0.00 Min. : 0.0 Min. : 0.00 Min. : 0
## 1st Qu.: 0.00 1st Qu.: 0.0 1st Qu.: 0.00 1st Qu.: 0
## Median : 0.00 Median : 0.0 Median : 0.00 Median : 0
## Mean : 29.06 Mean : 135.9 Mean : 77.45 Mean : 81
## 3rd Qu.: 0.00 3rd Qu.: 0.0 3rd Qu.: 0.00 3rd Qu.: 0
## Max. :1280.00 Max. :13120.0 Max. :3200.00 Max. :3200
## OCTUBRE NOVIEMBRE DICIEMBRE ENE.22
## Min. : 0.0 Min. : 0.00 Min. : 0.0 Min. : 0.00
## 1st Qu.: 0.0 1st Qu.: 0.00 1st Qu.: 0.0 1st Qu.: 0.00
## Median : 0.0 Median : 0.00 Median : 0.0 Median : 0.00
## Mean : 62.0 Mean : 89.69 Mean : 100.4 Mean : 82.37
## 3rd Qu.: 11.5 3rd Qu.: 4.00 3rd Qu.: 1.5 3rd Qu.: 26.50
## Max. :3200.0 Max. :6400.00 Max. :6400.0 Max. :3200.00
## FEBRERO.22 MARZO.22 ABRIL.22 MAYO.22
## Min. : 0.0 Min. : 0.0 Min. : 0.0 Min. : 0.0
## 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0
## Median : 0.0 Median : 0.0 Median : 0.0 Median : 0.0
## Mean : 103.5 Mean : 153.9 Mean : 186.5 Mean : 187.6
## 3rd Qu.: 0.0 3rd Qu.: 20.0 3rd Qu.: 24.0 3rd Qu.: 22.0
## Max. :9600.0 Max. :9600.0 Max. :16354.0 Max. :17665.0
## JUNIO.22 JULIO.22 AGOSTO.22 SEPTIEMBRE.22
## Min. : 0.0 Min. : 0.0 Min. : 0.0 Min. : 0.0
## 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0
## Median : 0.0 Median : 0.0 Median : 0.0 Median : 0.0
## Mean : 171.2 Mean : 316.9 Mean : 131.5 Mean : 272.3
## 3rd Qu.: 1.0 3rd Qu.: 15.5 3rd Qu.: 0.0 3rd Qu.: 0.0
## Max. :11050.0 Max. :25900.0 Max. :13200.0 Max. :29379.0
## OCTUBRE.22 NOVIEMBRE.22 DICIEMBRE.22 ENERO.23
## Min. : 0.0 Min. : 0.000 Min. : 0.000 Min. : 0.0000
## 1st Qu.: 0.0 1st Qu.: 0.000 1st Qu.: 0.000 1st Qu.: 0.0000
## Median : 0.0 Median : 0.000 Median : 0.000 Median : 0.0000
## Mean : 120.9 Mean : 2.113 Mean : 1.225 Mean : 0.5974
## 3rd Qu.: 0.0 3rd Qu.: 0.000 3rd Qu.: 0.000 3rd Qu.: 0.0000
## Max. :16421.0 Max. :324.000 Max. :276.000 Max. :138.0000
## FEBRERO.23 MARZO.23 TOTAL.MESES X X.1
## Min. :0 Min. :0 Min. : 0 Mode:logical Mode:logical
## 1st Qu.:0 1st Qu.:0 1st Qu.: 16 NA's:231 NA's:231
## Median :0 Median :0 Median : 115
## Mean :0 Mean :0 Mean : 2306
## 3rd Qu.:0 3rd Qu.:0 3rd Qu.: 724
## Max. :0 Max. :0 Max. :136754
# Se realizaron columnas nuevas haciendo referencia a los totales de entregas mensuales.
sum(is.na(bd))
## [1] 462
sapply(bd,function(x) sum(is.na(x)))
## CLIENTE.PLANTA PROYECTO ID.ODOO ITEM JUNIO
## 0 0 0 0 0
## JULIO AGOSTO SEPTIEMBRE OCTUBRE NOVIEMBRE
## 0 0 0 0 0
## DICIEMBRE ENE.22 FEBRERO.22 MARZO.22 ABRIL.22
## 0 0 0 0 0
## MAYO.22 JUNIO.22 JULIO.22 AGOSTO.22 SEPTIEMBRE.22
## 0 0 0 0 0
## OCTUBRE.22 NOVIEMBRE.22 DICIEMBRE.22 ENERO.23 FEBRERO.23
## 0 0 0 0 0
## MARZO.23 TOTAL.MESES X X.1
## 0 0 231 231
Se escogió este mĆ©todo de limpieza de datos ya que se considera importante saegurarse de que no hay datos con valores de caracteres āNAā los cuales pueden interrumpir el analisis posterior.
No se encontraron datos con denominacón NA, ya que todos fueron reemplazados con 0
#Eliminar datos del 2021
bd1 <- bd
bd1 <- subset (bd, select = -c (JUNIO, JULIO, AGOSTO, SEPTIEMBRE, OCTUBRE, NOVIEMBRE, DICIEMBRE))
summary(bd1)
## CLIENTE.PLANTA PROYECTO ID.ODOO ITEM
## Length:231 Length:231 Length:231 Length:231
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## ENE.22 FEBRERO.22 MARZO.22 ABRIL.22
## Min. : 0.00 Min. : 0.0 Min. : 0.0 Min. : 0.0
## 1st Qu.: 0.00 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0
## Median : 0.00 Median : 0.0 Median : 0.0 Median : 0.0
## Mean : 82.37 Mean : 103.5 Mean : 153.9 Mean : 186.5
## 3rd Qu.: 26.50 3rd Qu.: 0.0 3rd Qu.: 20.0 3rd Qu.: 24.0
## Max. :3200.00 Max. :9600.0 Max. :9600.0 Max. :16354.0
## MAYO.22 JUNIO.22 JULIO.22 AGOSTO.22
## Min. : 0.0 Min. : 0.0 Min. : 0.0 Min. : 0.0
## 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.0
## Median : 0.0 Median : 0.0 Median : 0.0 Median : 0.0
## Mean : 187.6 Mean : 171.2 Mean : 316.9 Mean : 131.5
## 3rd Qu.: 22.0 3rd Qu.: 1.0 3rd Qu.: 15.5 3rd Qu.: 0.0
## Max. :17665.0 Max. :11050.0 Max. :25900.0 Max. :13200.0
## SEPTIEMBRE.22 OCTUBRE.22 NOVIEMBRE.22 DICIEMBRE.22
## Min. : 0.0 Min. : 0.0 Min. : 0.000 Min. : 0.000
## 1st Qu.: 0.0 1st Qu.: 0.0 1st Qu.: 0.000 1st Qu.: 0.000
## Median : 0.0 Median : 0.0 Median : 0.000 Median : 0.000
## Mean : 272.3 Mean : 120.9 Mean : 2.113 Mean : 1.225
## 3rd Qu.: 0.0 3rd Qu.: 0.0 3rd Qu.: 0.000 3rd Qu.: 0.000
## Max. :29379.0 Max. :16421.0 Max. :324.000 Max. :276.000
## ENERO.23 FEBRERO.23 MARZO.23 TOTAL.MESES X
## Min. : 0.0000 Min. :0 Min. :0 Min. : 0 Mode:logical
## 1st Qu.: 0.0000 1st Qu.:0 1st Qu.:0 1st Qu.: 16 NA's:231
## Median : 0.0000 Median :0 Median :0 Median : 115
## Mean : 0.5974 Mean :0 Mean :0 Mean : 2306
## 3rd Qu.: 0.0000 3rd Qu.:0 3rd Qu.:0 3rd Qu.: 724
## Max. :138.0000 Max. :0 Max. :0 Max. :136754
## X.1
## Mode:logical
## NA's:231
##
##
##
##
Se eliminaron los datos del 2021, dejando solo los del 2022 y 2023, significando esto que solo se quedarƔn las ordenes historicas del 2022 y las entregas pendientes de los meses restantes y programadas para el 2023
library(arules)
## Loading required package: Matrix
##
## Attaching package: 'arules'
## The following objects are masked from 'package:base':
##
## abbreviate, write
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:arules':
##
## intersect, recode, setdiff, setequal, union
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
#count(bd1, ENE.22, sort = TRUE)
#count(bd1, FEBRERO.22, sort = TRUE)
#count(bd1, MARZO.22, sort = TRUE)
#count(bd1, ABRIL.22, sort = TRUE)
#count(bd1, MAYO.22, sort = TRUE)
#count(bd1, JUNIO.22, sort = TRUE)
#count(bd1, JULIO.22, sort = TRUE)
#count(bd1, AGOSTO.22, sort = TRUE)
#count(bd1, SEPTIEMBRE.22, sort = TRUE)
#count(bd1, OCTUBRE.22, sort = TRUE)
#count(bd1, NOVIEMBRE.22, sort = TRUE)
#count(bd1, DICIEMBRE.22, sort = TRUE)
# Existen 231 REGISTROS Y 19 variables presentes en la base de datos de Form
Variable <-c("PROYECTO","ID.ODOO", "ITEM", "CLIENTE.PLANTA","ENERO.22", "FEBRERO.22","MARZO.22","ABRIL.22","MAYO.22","JUNIO.22","JULIO.22","AGOSTO.22","SEPTIEMBRE.22","OCTUBRE.22","NOVIEMBRE.22","DICIEMBRE.22", "ENERO.23", "FEBRERO.23", "MARZO.23")
Measurement <-c("Cualitative", "Cualitative", "Cualitative", "Cualitative", "quantiative (discrete)", "quantiative (discrete)", "quantitative (discrete)", "quantitative (discrete)", "quantitative (discrete)", "quantitative (discrete)", "quantitative (discrete)", "quantitative (discrete)","quantitative (discrete)","quantitative (discrete)","quantitative (discrete)","quantitative (discrete)","quantitative (discrete)","quantitative (discrete)","quantitative (discrete)")
Scale <-c("nominal", "nominal", "nominal", "nominal", "razon", "razon", "razon", "razon", "razon", "razon", "razon", "razon","razon","razon","razon","razon","razon","razon","razon")
clasificacion <- data.frame(Variable, Measurement, Scale)
clasificacion
## Variable Measurement Scale
## 1 PROYECTO Cualitative nominal
## 2 ID.ODOO Cualitative nominal
## 3 ITEM Cualitative nominal
## 4 CLIENTE.PLANTA Cualitative nominal
## 5 ENERO.22 quantiative (discrete) razon
## 6 FEBRERO.22 quantiative (discrete) razon
## 7 MARZO.22 quantitative (discrete) razon
## 8 ABRIL.22 quantitative (discrete) razon
## 9 MAYO.22 quantitative (discrete) razon
## 10 JUNIO.22 quantitative (discrete) razon
## 11 JULIO.22 quantitative (discrete) razon
## 12 AGOSTO.22 quantitative (discrete) razon
## 13 SEPTIEMBRE.22 quantitative (discrete) razon
## 14 OCTUBRE.22 quantitative (discrete) razon
## 15 NOVIEMBRE.22 quantitative (discrete) razon
## 16 DICIEMBRE.22 quantitative (discrete) razon
## 17 ENERO.23 quantitative (discrete) razon
## 18 FEBRERO.23 quantitative (discrete) razon
## 19 MARZO.23 quantitative (discrete) razon
library(plyr)
## ------------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## ------------------------------------------------------------------------------
##
## Attaching package: 'plyr'
## The following objects are masked from 'package:dplyr':
##
## arrange, count, desc, failwith, id, mutate, rename, summarise,
## summarize
table(bd1$CLIENTE.PLANTA)
##
## ABC QUERETARO ANTOLIN ARTEAGA ANTOLIN TOLUCA DENSO HANON
## 1 1 9 57 2
## HELLA INOAC POLYTEC ISRI MERIDIAN SEGROVE
## 9 2 1 6 1
## STB 1 STB3 STB4 STB5 STB6
## 1 1 1 1 1
## STB7 STB8 STB9 TRMX UFI
## 1 1 1 16 5
## VARROC YANFENG sm YF QRO YF RAMOS YFCF
## 71 21 2 8 10
## YFTO
## 1
tab_bd1 <- table(bd1$TOTAL.MESES, bd1$CLIENTE.PLANTA)
tab_bd1
##
## ABC QUERETARO ANTOLIN ARTEAGA ANTOLIN TOLUCA DENSO HANON HELLA
## 0 0 0 2 2 0 0
## 1 0 1 0 1 0 0
## 2 0 0 0 0 0 0
## 3 0 0 0 0 0 0
## 4 0 0 0 1 0 0
## 5 0 0 0 6 0 0
## 7 0 0 1 0 0 0
## 8 1 0 0 0 0 0
## 9 0 0 0 0 0 0
## 10 0 0 0 2 0 0
## 11 0 0 0 0 0 0
## 14 0 0 0 1 0 0
## 15 0 0 0 2 0 0
## 16 0 0 0 1 0 0
## 19 0 0 0 1 0 0
## 20 0 0 0 1 0 0
## 22 0 0 0 0 0 2
## 23 0 0 0 1 0 0
## 24 0 0 0 0 0 0
## 25 0 0 0 1 0 0
## 26 0 0 0 1 0 0
## 28 0 0 0 0 0 1
## 30 0 0 0 6 0 0
## 35 0 0 0 2 0 0
## 36 0 0 0 0 0 0
## 39 0 0 1 0 0 0
## 40 0 0 0 0 0 0
## 41 0 0 0 1 0 0
## 45 0 0 1 0 0 0
## 47 0 0 0 0 0 0
## 50 0 0 0 4 1 0
## 51 0 0 0 1 0 0
## 55 0 0 1 0 0 0
## 56 0 0 0 0 0 1
## 58 0 0 1 0 0 0
## 68 0 0 0 2 0 0
## 69 0 0 0 0 0 0
## 70 0 0 0 0 0 0
## 75 0 0 0 0 0 0
## 77 0 0 0 0 0 0
## 85 0 0 0 1 0 0
## 92 0 0 0 0 0 0
## 100 0 0 0 0 0 0
## 104 0 0 0 0 0 0
## 105 0 0 0 0 0 0
## 106 0 0 0 1 0 0
## 108 0 0 0 0 0 0
## 112 0 0 0 0 0 0
## 114 0 0 0 1 0 0
## 115 0 0 0 0 0 0
## 124 0 0 0 0 0 0
## 130 0 0 0 0 0 0
## 132 0 0 0 2 0 0
## 137 0 0 0 0 0 0
## 140 0 0 0 0 0 0
## 148 0 0 0 0 0 0
## 152 0 0 0 0 0 0
## 155 0 0 0 0 0 0
## 165 0 0 0 0 0 0
## 166 0 0 0 0 0 0
## 167 0 0 0 0 0 0
## 170 0 0 0 0 0 0
## 173 0 0 0 0 0 0
## 175 0 0 0 1 0 0
## 180 0 0 0 0 0 0
## 183 0 0 0 0 0 0
## 189 0 0 0 1 0 0
## 198 0 0 0 0 0 0
## 200 0 0 0 0 0 0
## 208 0 0 0 1 0 0
## 210 0 0 0 0 0 0
## 224 0 0 0 0 0 0
## 230 0 0 0 0 0 0
## 238 0 0 0 0 0 0
## 240 0 0 0 0 0 0
## 250 0 0 0 1 0 0
## 265 0 0 0 1 0 0
## 270 0 0 1 0 0 0
## 293 0 0 0 1 0 0
## 314 0 0 0 0 0 0
## 320 0 0 0 0 0 0
## 325 0 0 0 0 0 0
## 330 0 0 0 1 0 0
## 360 0 0 0 0 1 0
## 365 0 0 0 0 0 0
## 366 0 0 0 0 0 0
## 376 0 0 0 0 0 0
## 403 0 0 0 0 0 0
## 408 0 0 0 0 0 0
## 419 0 0 0 0 0 0
## 426 0 0 0 0 0 0
## 440 0 0 0 0 0 0
## 443 0 0 0 1 0 0
## 445 0 0 0 0 0 0
## 480 0 0 0 0 0 0
## 488 0 0 0 0 0 0
## 500 0 0 0 0 0 0
## 532 0 0 0 0 0 0
## 541 0 0 0 0 0 0
## 690 0 0 1 0 0 0
## 700 0 0 0 0 0 0
## 712 0 0 0 1 0 0
## 736 0 0 0 0 0 0
## 740 0 0 0 0 0 0
## 814 0 0 0 0 0 0
## 843 0 0 0 0 0 0
## 848 0 0 0 0 0 0
## 868 0 0 0 0 0 0
## 881 0 0 0 0 0 0
## 896 0 0 0 1 0 0
## 966 0 0 0 0 0 0
## 993 0 0 0 0 0 0
## 1014 0 0 0 1 0 0
## 1150 0 0 0 0 0 0
## 1153 0 0 0 1 0 0
## 1179 0 0 0 0 0 0
## 1219 0 0 0 0 0 0
## 1300 0 0 0 0 0 0
## 1370 0 0 0 0 0 0
## 1555 0 0 0 0 0 0
## 1570 0 0 0 0 0 0
## 1628 0 0 0 0 0 0
## 1673 0 0 0 0 0 0
## 1836 0 0 0 0 0 0
## 2000 0 0 0 0 0 0
## 2247 0 0 0 0 0 0
## 2300 0 0 0 0 0 0
## 2362 0 0 0 0 0 0
## 2550 0 0 0 0 0 0
## 2600 0 0 0 0 0 0
## 2754 0 0 0 0 0 0
## 2886 0 0 0 0 0 0
## 3000 0 0 0 1 0 0
## 3498 0 0 0 1 0 0
## 3850 0 0 0 0 0 0
## 4189 0 0 0 0 0 0
## 4200 0 0 0 0 0 0
## 4340 0 0 0 0 0 0
## 4440 0 0 0 0 0 0
## 4644 0 0 0 0 0 0
## 5035 0 0 0 0 0 0
## 5277 0 0 0 0 0 0
## 5642 0 0 0 0 0 0
## 5830 0 0 0 0 0 1
## 5977 0 0 0 0 0 0
## 6700 0 0 0 0 0 0
## 6877 0 0 0 0 0 1
## 6912 0 0 0 0 0 0
## 6914 0 0 0 0 0 0
## 7000 0 0 0 0 0 0
## 7482 0 0 0 0 0 0
## 8244 0 0 0 0 0 0
## 9719 0 0 0 1 0 0
## 21250 0 0 0 0 0 0
## 21474 0 0 0 0 0 0
## 24220 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0
## 77 0 0 1 0 0 0 0 0 0 0
## 85 0 0 0 0 0 0 0 0 0 0
## 92 0 0 0 0 0 0 0 0 0 0
## 100 0 0 1 0 0 0 0 0 0 0
## 104 0 0 0 0 0 0 0 0 0 0
## 105 0 0 0 0 0 0 0 0 0 0
## 106 0 0 0 0 0 0 0 0 0 0
## 108 0 0 0 0 0 0 0 0 0 0
## 112 0 0 0 0 0 0 0 0 0 0
## 114 0 0 0 0 0 0 0 0 0 0
## 115 0 0 0 0 0 0 0 0 0 0
## 124 0 0 0 0 0 0 0 0 0 0
## 130 0 0 0 0 0 0 0 0 0 0
## 132 0 0 0 0 0 0 0 0 0 0
## 137 0 0 0 0 0 0 0 0 0 0
## 140 0 0 0 0 0 0 0 0 0 0
## 148 0 0 0 0 0 0 0 0 0 0
## 152 0 0 0 0 0 0 0 0 0 0
## 155 0 0 0 0 0 0 0 0 0 0
## 165 0 0 0 0 0 0 0 0 0 0
## 166 0 0 0 0 0 0 0 0 0 0
## 167 0 0 0 0 0 0 0 0 0 0
## 170 0 0 0 0 0 0 0 0 0 0
## 173 0 0 0 0 0 0 0 0 0 0
## 175 0 0 0 0 0 0 0 0 0 0
## 180 0 0 0 0 0 0 0 0 0 0
## 183 0 0 0 0 0 0 0 0 0 0
## 189 0 0 0 0 0 0 0 0 0 0
## 198 0 0 0 0 0 0 0 0 0 0
## 200 0 0 0 0 0 0 0 0 0 1
## 208 0 0 0 0 0 0 0 0 0 0
## 210 0 0 0 0 0 0 0 0 0 0
## 224 0 0 0 0 0 0 0 0 0 0
## 230 0 0 0 0 0 0 0 0 0 0
## 238 0 0 0 0 0 0 0 0 0 0
## 240 0 0 0 0 0 0 0 0 0 0
## 250 0 0 0 0 0 0 0 0 0 0
## 265 0 0 0 0 0 0 0 0 0 0
## 270 0 0 0 0 0 0 0 0 0 0
## 293 0 0 0 0 0 0 0 0 0 0
## 314 0 0 0 0 0 0 0 0 0 0
## 320 0 0 0 0 0 0 0 0 0 0
## 325 0 0 0 0 0 0 0 0 0 0
## 330 0 0 0 0 0 0 0 0 0 0
## 360 0 0 0 0 0 0 0 0 0 0
## 365 0 0 0 0 0 0 0 0 0 0
## 366 0 0 0 0 0 0 0 0 0 0
## 376 0 0 0 0 0 0 0 0 0 0
## 403 0 0 1 0 0 0 0 0 0 0
## 408 0 0 0 0 0 0 0 0 0 0
## 419 0 0 0 0 0 0 1 0 0 0
## 426 0 0 0 0 0 0 0 1 0 0
## 440 0 0 0 0 0 0 0 0 0 0
## 443 0 0 0 0 0 0 0 0 0 0
## 445 0 0 0 0 0 0 0 0 0 0
## 480 0 0 0 0 0 0 0 0 0 0
## 488 0 0 0 0 0 0 0 0 0 0
## 500 0 0 0 0 0 0 0 0 0 0
## 532 0 0 0 0 0 0 0 0 0 0
## 541 0 0 0 0 0 0 0 0 0 0
## 690 0 0 0 0 0 0 0 0 0 0
## 700 0 0 0 0 0 0 0 0 0 0
## 712 0 0 0 0 0 0 0 0 0 0
## 736 0 0 0 1 0 0 0 0 0 0
## 740 0 0 0 0 0 0 0 0 0 0
## 814 0 0 0 0 0 0 0 0 0 0
## 843 0 0 0 0 0 0 0 0 0 0
## 848 0 0 0 0 0 0 0 0 0 0
## 868 0 0 0 0 0 0 0 0 0 0
## 881 0 0 0 0 0 0 0 0 0 0
## 896 0 0 0 0 0 0 0 0 0 0
## 966 0 0 0 0 0 0 0 0 0 0
## 993 0 0 0 0 0 0 0 0 0 0
## 1014 0 0 0 0 0 0 0 0 0 0
## 1150 0 0 0 0 0 0 0 0 0 0
## 1153 0 0 0 0 0 0 0 0 0 0
## 1179 0 0 0 0 0 0 0 0 0 0
## 1219 0 0 0 0 0 0 0 0 0 0
## 1300 0 0 0 0 0 0 0 0 0 0
## 1370 0 0 0 0 0 0 0 0 0 0
## 1555 0 0 0 0 0 0 0 0 0 0
## 1570 0 0 0 0 0 0 0 0 0 0
## 1628 0 0 0 0 0 0 0 0 0 0
## 1673 0 0 0 0 0 0 0 0 0 0
## 1836 0 0 0 0 0 0 0 0 0 0
## 2000 0 0 0 0 0 0 0 0 0 0
## 2247 0 0 0 0 0 0 0 0 0 0
## 2300 0 0 0 0 0 0 0 0 0 0
## 2362 0 0 0 0 0 0 0 0 0 0
## 2550 0 0 0 0 0 0 0 0 0 0
## 2600 0 0 0 0 0 0 0 0 0 0
## 2754 0 0 0 0 0 0 0 0 0 0
## 2886 0 0 0 0 0 0 0 0 0 0
## 3000 0 1 0 0 0 0 0 0 0 0
## 3498 0 0 0 0 0 0 0 0 0 0
## 3850 0 0 0 0 0 1 0 0 0 0
## 4189 0 0 0 0 0 0 0 0 0 0
## 4200 0 0 0 0 0 0 0 0 0 0
## 4340 0 0 0 0 0 0 0 0 0 0
## 4440 0 0 0 0 0 0 0 0 0 0
## 4644 0 0 0 0 0 0 0 0 0 0
## 5035 0 0 0 0 0 0 0 0 0 0
## 5277 0 0 0 0 0 0 0 0 0 0
## 5642 0 0 0 0 0 0 0 0 0 0
## 5830 0 0 0 0 0 0 0 0 0 0
## 5977 0 0 0 0 0 0 0 0 0 0
## 6700 0 0 0 0 0 0 0 0 0 0
## 6877 0 0 0 0 0 0 0 0 0 0
## 6912 0 0 0 0 0 0 0 0 0 0
## 6914 0 0 0 0 0 0 0 0 0 0
## 7000 0 0 0 0 0 0 0 0 0 0
## 7482 0 0 0 0 0 0 0 0 0 0
## 8244 0 0 0 0 0 0 0 0 0 0
## 9719 0 0 0 0 0 0 0 0 0 0
## 21250 0 0 0 0 0 0 0 0 0 0
## 21474 0 0 0 0 0 0 0 0 0 0
## 24220 0 0 0 0 0 0 0 0 0 0
## 32880 0 0 0 0 0 0 0 0 0 0
## 108409 0 0 0 0 0 0 0 0 0 0
## 136754 0 0 0 0 0 0 0 0 0 0
##
## STB8 STB9 TRMX UFI VARROC YANFENG sm YF QRO YF RAMOS YFCF YFTO
## 0 0 0 1 1 17 2 0 1 0 0
## 1 0 0 0 0 0 0 0 0 0 0
## 2 0 0 0 0 1 1 0 0 1 0
## 3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 0 0
## 108 0 0 0 0 1 0 0 0 0 0
## 112 0 0 0 0 1 0 0 0 0 0
## 114 0 0 0 0 0 0 0 0 0 0
## 115 0 0 0 0 0 0 0 0 1 0
## 124 0 0 0 0 0 1 0 0 0 0
## 130 0 0 0 0 1 0 0 0 0 0
## 132 0 0 0 0 2 0 0 0 0 0
## 137 0 0 0 1 0 0 0 0 0 0
## 140 0 0 0 0 1 0 0 0 0 0
## 148 0 0 0 0 1 0 0 0 0 0
## 152 0 0 0 0 1 0 0 0 0 0
## 155 0 0 0 0 0 1 0 0 0 0
## 165 0 0 0 0 1 0 0 0 0 0
## 166 0 0 0 0 1 1 0 0 0 0
## 167 0 0 0 0 0 0 0 0 1 0
## 170 0 0 0 0 1 0 0 0 0 0
## 173 0 0 0 0 0 1 0 0 0 0
## 175 0 0 0 0 0 0 0 0 0 0
## 180 0 0 0 0 1 0 0 0 0 0
## 183 0 0 0 0 1 0 0 0 0 0
## 189 0 0 0 0 0 0 0 0 0 0
## 198 0 0 0 0 0 1 0 0 0 0
## 200 0 0 0 0 0 0 0 0 0 0
## 208 0 0 0 0 0 0 0 0 0 0
## 210 0 0 0 0 1 0 0 0 0 0
## 224 0 0 0 0 1 0 0 0 0 0
## 230 0 0 0 0 1 0 0 0 0 0
## 238 0 0 0 0 1 0 0 0 0 0
## 240 0 0 0 0 1 0 0 0 0 0
## 250 0 0 0 0 0 0 0 0 0 0
## 265 0 0 0 0 0 0 0 0 0 0
## 270 0 0 0 0 0 0 0 0 0 0
## 293 0 0 0 0 0 0 0 0 0 0
## 314 0 0 0 0 1 0 0 0 0 0
## 320 0 0 1 0 0 0 0 0 0 0
## 325 0 0 1 0 0 0 0 0 0 0
## 330 0 0 0 0 0 0 0 0 0 0
## 360 0 0 0 0 0 0 0 0 0 0
## 365 0 0 0 0 1 0 0 0 0 0
## 366 0 0 0 2 0 0 0 0 0 0
## 376 0 0 0 0 0 0 0 1 0 0
## 403 0 0 0 0 0 0 0 0 0 0
## 408 0 0 0 0 1 0 0 0 0 0
## 419 0 0 0 0 0 0 0 0 0 0
## 426 0 0 0 0 0 0 0 0 0 0
## 440 0 0 0 0 1 0 0 0 0 0
## 443 0 0 0 0 0 0 0 0 0 0
## 445 0 0 0 0 0 0 0 0 1 0
## 480 0 0 0 0 1 0 0 0 0 0
## 488 0 0 0 0 0 1 0 0 0 0
## 500 0 0 0 0 1 0 0 0 0 0
## 532 0 0 0 0 0 0 0 1 0 0
## 541 0 0 0 0 1 0 0 0 0 0
## 690 0 0 0 0 0 0 0 0 0 0
## 700 1 0 0 0 0 0 0 0 0 0
## 712 0 0 0 0 0 0 0 0 0 0
## 736 0 0 0 0 0 0 0 0 0 0
## 740 0 0 0 0 0 0 0 0 1 0
## 814 0 0 0 0 1 0 0 0 0 0
## 843 0 0 0 0 1 0 0 0 0 0
## 848 0 0 0 0 0 0 0 0 1 0
## 868 0 0 0 0 1 0 0 0 0 0
## 881 0 0 0 0 0 0 0 1 0 0
## 896 0 0 0 0 0 0 0 0 0 0
## 966 0 0 0 0 1 0 0 0 0 0
## 993 0 0 0 0 0 0 0 1 0 0
## 1014 0 0 0 0 0 0 0 0 0 0
## 1150 0 0 0 0 1 0 0 0 0 0
## 1153 0 0 0 0 0 0 0 0 0 0
## 1179 0 0 0 0 0 0 0 1 0 0
## 1219 0 0 0 0 0 0 0 0 1 0
## 1300 0 0 0 0 1 0 0 0 0 0
## 1370 0 0 1 0 0 0 0 0 0 0
## 1555 0 0 0 0 1 0 0 0 0 0
## 1570 0 0 0 0 1 0 0 0 0 0
## 1628 0 0 0 0 1 0 0 0 0 0
## 1673 0 0 0 0 1 0 0 0 0 0
## 1836 0 0 1 0 0 0 0 0 0 0
## 2000 0 0 1 0 0 0 0 0 0 0
## 2247 0 0 0 0 1 0 0 0 0 0
## 2300 0 0 0 0 1 0 0 0 0 0
## 2362 0 0 0 0 1 0 0 0 0 0
## 2550 0 0 0 0 1 0 0 0 0 0
## 2600 0 0 1 0 0 0 0 0 0 0
## 2754 0 0 0 0 1 0 0 0 0 0
## 2886 0 0 0 0 1 0 0 0 0 0
## 3000 0 0 0 0 0 0 0 0 0 0
## 3498 0 0 0 0 0 0 0 0 0 0
## 3850 0 0 0 0 0 0 0 0 0 0
## 4189 0 0 0 0 1 0 0 0 0 0
## 4200 0 0 0 0 0 0 0 0 1 0
## 4340 0 0 0 0 0 0 0 0 1 0
## 4440 0 0 1 0 0 0 0 0 0 0
## 4644 0 0 1 0 0 0 0 0 0 0
## 5035 0 0 0 0 0 0 0 0 1 0
## 5277 0 0 1 0 0 0 0 0 0 0
## 5642 0 0 0 0 1 0 0 0 0 0
## 5830 0 0 0 0 0 0 0 0 0 0
## 5977 0 0 1 0 0 0 0 0 0 0
## 6700 0 0 0 0 1 0 0 0 0 0
## 6877 0 0 0 0 0 0 0 0 0 0
## 6912 0 0 1 0 0 0 0 0 0 0
## 6914 0 0 0 0 1 0 0 0 0 0
## 7000 0 0 0 1 0 0 0 0 0 0
## 7482 0 0 1 0 0 0 0 0 0 0
## 8244 0 0 0 0 1 0 0 0 0 0
## 9719 0 0 0 0 0 0 0 0 0 0
## 21250 0 0 1 0 0 0 0 0 0 0
## 21474 0 0 1 0 0 0 0 0 0 0
## 24220 0 0 1 0 0 0 0 0 0 0
## 32880 0 0 0 0 0 0 0 0 0 0
## 108409 0 0 0 0 0 0 0 0 0 0
## 136754 0 0 0 0 0 0 0 0 0 0
barplot(tab_bd1, main = "Entregas Totales",
xlab = "Clientes", ylab = "Entregas Anuales",
col = c("royalblue", "grey"))
b <- bd1$TOTAL.MESES
b <- ifelse(b > 9719, 9719, b)
plot(b, type="b", main="Entregas Totales", xlab ="Producto", ylab = "Entregas")