Libreria

library(readxl)
library(writexl)
library(ggplot2)

cargar datos

datos1=read_excel("Oferta.xlsx", sheet = 2)
head(datos1, 3)
## # A tibble: 3 × 1
##      oferta
##       <dbl>
## 1 17560884.
## 2 18110589.
## 3 19138105.

Grafico

d1s=ts(datos1,start = 1988, frequency = 1)
plot(d1s)

## pronostico

d1sw=HoltWinters(d1s,gamma = F)
d1sp=predict(d1sw,10)
plot(d1sw,d1sp,main="Oferta final: 1988:2024")

## Guardar datos

Perido=seq(1988,2034,1)
Oferta=rbind(d1s,d1sp)
Dato=c(rep("Real",37),rep("pronosticado",10))
Datos_oferta=data.frame(Perido,Oferta,Dato)
write_xlsx(Datos_oferta,"Oferta.xlsx")