UNIVERSIDAD CENTRAL DEL ECUADOR

FACULTAD DE CIENCIAS ECONOMICAS

SISTEMAS DE INFORMACIÓN GEOGRÁFICA

Autores

-Rene Avila
-Michael Chacaguasay
-Johann Tul
-Bryan Venegas

##CREAMOS TRES VECTORE CON NUESTROS DATOS UTILIZAMOS UN DATA FRAME PARA AGRUPAR NUESTROS DATOS ESTABLCEMOS NUESTROS DATOS EN COLUMNAS UTILIZANDO COLNAMES LISTADO DE PRODUCTOS SON SU STOCK Y PRECIOS

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)


Productos<-data.frame(PRODUCTO,STOCK,PVP,IVA)
colnames(Productos)<-(c("Producto","Stock","PVP","IVA"))
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 DE PRODUCTOS CON LOS QUE TRABAJA LA EMPRESA

MARCAS<-c("Sony","Logutech","Epson")
MARCAS
## [1] "Sony"     "Logutech" "Epson"

#VENTAS POR MES DE LA EMPRESA

MES<-c("Enero","Febrero","Marzo","Abril","Mayo")
NETO<-c(23600,12340,8900,5600,9600)
IVA2<-c(1780,1350,970,450,990)
TOTAL<-c(2538,13690,9870,6050,10590)
Ventas<-data.frame(MES,NETO,IVA2,TOTAL)
colnames(Ventas)<-c("MES","NETO","IVA","TOTAL")
Ventas
##       MES  NETO  IVA TOTAL
## 1   Enero 23600 1780  2538
## 2 Febrero 12340 1350 13690
## 3   Marzo  8900  970  9870
## 4   Abril  5600  450  6050
## 5    Mayo  9600  990 10590

##CREAMOS UNA LISTA CON NUESTROS DATA FREAM CREADOS ##DE PRODUCTOS,MARCAS,VENTAS

EmpresaComercial<-list(Productos,MARCAS,Ventas)

Con la información indicada crear una lista que contenga toda la información de la empresa.

PROBLEMA 1

###Colocar nombres a cada unos de los objetos de la lista

names(EmpresaComercial)<-c("Listado de productos con su stock y Precio",
                           "Marcas de Productos con los que trabaja la empresa ",
                           "Ventas por mes de la empresa")

EmpresaComercial
## $`Listado de productos con su stock y Precio`
##              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 de Productos con los que trabaja la empresa `
## [1] "Sony"     "Logutech" "Epson"   
## 
## $`Ventas por mes de la empresa`
##       MES  NETO  IVA TOTAL
## 1   Enero 23600 1780  2538
## 2 Febrero 12340 1350 13690
## 3   Marzo  8900  970  9870
## 4   Abril  5600  450  6050
## 5    Mayo  9600  990 10590

Problema 2

###Escribir un comando que muestre solo las marcas que trabaja la empresa

EmpresaComercial[[2]]
## [1] "Sony"     "Logutech" "Epson"

Problema 3

Escribir un comando que muestre las ventas de abril de la empresa

EmpresaComercial[[3]][4,4]
## [1] 6050

Problema 4

###A la lista anterior agregar la siguiente información de Proveedor de la empresa CREAMOS NUESTROS VECTORES PARA ADJUNTAR DATOS UTILIUZAMOS NUESTRO DATA FREAM PARA AGRUPAR LOS NUEVOS DATOS AGREGAMOS A NUESTRO LISTADO ANTERIOR NUESTRO DATA FREAM Proveedores

PROVEEDOR<-c("Importadora del Austro","Comercializadora del Sur","ABC $ Asociados")
CIUDAD<-c("Cuenca","Loja","Quito")
TELEFONO<-c(2222222,7777777,8888888)
Proveedores<-data.frame(PROVEEDOR,CIUDAD,TELEFONO)
EmpresaComercial$Proveedores<-Proveedores
EmpresaComercial
## $`Listado de productos con su stock y Precio`
##              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 de Productos con los que trabaja la empresa `
## [1] "Sony"     "Logutech" "Epson"   
## 
## $`Ventas por mes de la empresa`
##       MES  NETO  IVA TOTAL
## 1   Enero 23600 1780  2538
## 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

Problema 5

###Eliminar de la lista el objeto que contiene las marcas de los productos UTILIZAMOS LA FUNCION NULL PARA ELIMINAR NUESTRO DATA FREAM DE MARCAS

EmpresaComercial$`Marcas de Productos con los que trabaja la empresa `<-NULL
EmpresaComercial
## $`Listado de productos con su stock y Precio`
##              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 por mes de la empresa`
##       MES  NETO  IVA TOTAL
## 1   Enero 23600 1780  2538
## 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