I'm new to R Programming, and have the following dataset loaded into R (5 Columns, 24 Rows). Each row represents a month and have information connected to each month spanning 2 Years (Hence 24 rows). However when I run the following code it seems to be asking for a dataframe size 4 times as large, I'm assuming to replicate each season within a year but am not sure why it connot interpret my orginial dataframe:
library(ggplot2)
library(ggfortify)
library(fpp2)
Model_Data <- read_excel("C:/Users/Sam/A1C_Demand_Model_Data.xlsx",
sheet = "Model_Data")
y <- ts(A1C_Demand_Model_Data, start=2019, frequency=12)
autoplot(y[,"A1C_Sessions_Attended"]) +
ggtitle("A1C Sessions Attended") +
xlab("Year") +
ylab("A1C_Demand_Model_Data")
View(y)
ggseasonplot(y, Year.labels=TRUE, Year.labels.left=TRUE)
Error that appears: "Error in data.frame(y = as.numeric(x), year = trunc(round(time(x), 8)), : arguments imply differing number of rows: 144, 36"
Can someone explain what is happening here?