CARRERA DE INGENIERÍA EN ESTADÍSTICA TERCER
SEMESTRE
PROGRAMACIÓN
TALLER Nº7
TEMA: LISTAS Y ARREGLOS
GRUPO Nº7
Curso: EST S3 – 002
Docente: Ing. Francisco Valverde
# Listado de productos
productos <- data.frame(
Producto = c("Televisor 32","Televisor LED 55","Impresora Matricial","Parlantes"
,"Impresora Inyección"),
Stock = c(4, 5, 8, 3, 10),
PVP = c(250, 680, 210, 89, 280),
IVA = c(TRUE, TRUE, FALSE, FALSE, TRUE)
)
# Listado de marcas
marcas <- c("Sony", "Logitech", "Epson")
# Ventas mensuales
ventas_mensuales <- data.frame(
Mes = c("Enero", "Febrero", "Marzo", "Abril", "Mayo"),
Neto = c(23600, 12340, 8900, 5600, 9600),
IVA = c(1780, 1350, 970, 450, 990),
Total = c(25380, 13690, 9870, 6050, 10590)
)
# Crear la lista con nombres
empresacomercial <- list(
productos = productos,
marcas = marcas,
ventas = ventas_mensuales
)
empresacomercial
## $productos
## Producto Stock PVP IVA
## 1 Televisor 32 4 250 TRUE
## 2 Televisor LED 55 5 680 TRUE
## 3 Impresora Matricial 8 210 FALSE
## 4 Parlantes 3 89 FALSE
## 5 Impresora Inyección 10 280 TRUE
##
## $marcas
## [1] "Sony" "Logitech" "Epson"
##
## $ventas
## Mes Neto IVA Total
## 1 Enero 23600 1780 25380
## 2 Febrero 12340 1350 13690
## 3 Marzo 8900 970 9870
## 4 Abril 5600 450 6050
## 5 Mayo 9600 990 10590
empresacomercial$marcas
## [1] "Sony" "Logitech" "Epson"
empresacomercial$ventas[empresacomercial$ventas$Mes == "Abril", ]
## Mes Neto IVA Total
## 4 Abril 5600 450 6050
proveedores <- data.frame(
Proveedor = c("Importadora del Austro", "Comercializadora del Sur", "ABC & Asociados"),
Ciudad = c("Cuenca", "Loja", "Quito"),
Telefono = c(2222222, 7777777, 8888888)
)
empresacomercial$proveedores <- proveedores
marcas
empresacomercial$marcas <- NULL
print(empresacomercial)
## $productos
## Producto Stock PVP IVA
## 1 Televisor 32 4 250 TRUE
## 2 Televisor LED 55 5 680 TRUE
## 3 Impresora Matricial 8 210 FALSE
## 4 Parlantes 3 89 FALSE
## 5 Impresora Inyección 10 280 TRUE
##
## $ventas
## Mes Neto IVA Total
## 1 Enero 23600 1780 25380
## 2 Febrero 12340 1350 13690
## 3 Marzo 8900 970 9870
## 4 Abril 5600 450 6050
## 5 Mayo 9600 990 10590
##
## $proveedores
## Proveedor Ciudad Telefono
## 1 Importadora del Austro Cuenca 2222222
## 2 Comercializadora del Sur Loja 7777777
## 3 ABC & Asociados Quito 8888888