library(mise) library(readxl) library(ggplot2) #P1 Demanda <- read_excel("~/Desktop/U/Economia Aux/Clase R/MenuJunaSubway.xlsx", sheet="Demanda") Oferta <- read_excel("~/Desktop/U/Economia Aux/Clase R/MenuJunaSubway.xlsx", sheet="Oferta") Costos <- read_excel("~/Desktop/U/Economia Aux/Clase R/MenuJunaSubway.xlsx", sheet="Costos") #P2 ggplot(Demanda, aes(y=Precio, x=Cantidad)) + geom_point() + stat_smooth() ggplot(Oferta, aes(y=Precio, x=Cantidad)) + geom_point() + stat_smooth() ggplot() + geom_smooth(data=Demanda, aes(x=Cantidad, y=Precio), color='green') + geom_smooth(data=Oferta, aes(x=Cantidad, y=Precio), color='red') #P3 lm(Cantidad ~ Precio , data=Demanda) lm(Cantidad ~ Precio , data=Oferta) #P4