Hello ,
i am new to R and R studio and i am trying to build a timeseries , but i am struggling because the function doesn't recognize time nor the spend data .
here is the code , and the how the plot looks like :
library(ggplot2)
library(ggfortify)
library(readxl)
library(zoo)
library(forecast)
TSpend <- read_excel("TSpend.xlsx")
View(TSpend)
myts <- ts(TSpend$Spend €
, start = c(2016, 1), frequency = 4)
View(myts)
autoplot(myts)
Thank you!!
here is a sample of the dataset
Fiscal Year | Spend € |
---|---|
2018 | € 27,22 |
2020 | € 27,61 |
2018 | € 27,77 |
2019 | € 28,80 |
2016 | € 31,15 |
2016 | € 31,15 |
2016 | € 31,15 |
2016 | € 31,15 |
2017 | € 32,07 |
2017 | € 32,07 |
2020 | € 32,82 |
2020 | € 32,82 |
2019 | € 35,00 |
2019 | € 35,00 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2016 | € 37,37 |
2019 | € 38,15 |
2020 | € 38,65 |
2020 | € 38,65 |
2017 | € 40,41 |
2017 | € 41,44 |
2019 | € 42,80 |
2019 | € 42,80 |
2019 | € 42,80 |
2016 | € 43,33 |
2016 | € 43,33 |
2016 | € 43,33 |
2016 | € 43,33 |
2016 | € 43,33 |
2019 | € 43,91 |
2016 | € 45,16 |
2017 | € 45,54 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2016 | € 46,10 |
2018 | € 47,78 |
2018 | € 47,78 |
2018 | € 47,78 |
2018 | € 47,78 |
2016 | € 48,99 |
2016 | € 51,06 |
2016 | € 51,06 |
2016 | € 51,06 |
2016 | € 51,06 |
2016 | € 51,06 |
2016 | € 51,06 |
2016 | € 51,06 |
2018 | € 52,91 |
2016 | € 57,12 |
2016 | € 57,12 |
2017 | € 57,12 |
2017 | € 57,12 |
2016 | € 57,66 |
2016 | € 57,66 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2017 | € 58,00 |
2017 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2017 | € 58,00 |
2017 | € 58,00 |
2017 | € 58,00 |
2017 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2018 | € 58,00 |
2017 | € 58,00 |
2017 | € 58,00 |
2020 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2019 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2018 | € 59,00 |
2019 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2019 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2020 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |
2018 | € 59,00 |