Hi all,
I am trying to plot time series after importing the data from csv to R.
now, the issue is:
the data needs to be read by Rows and not by columns.
when I am putting, Row header which is a product ID, it is taking the column value.
pasting the same code here.
rm(list = ls())
#set directory
setwd("d:\\Users\\AFG")
install.packages("reprex")
library(plyr)
# load required packages
library(readr)
library(dplyr)
library(ggplot2)
library(forecast)
library(reprex)
# import data
sales <- read.csv("SalesHistoryTop50SKU-reprex.csv", header = TRUE, blank.lines.skip = TRUE)
# reading sales
sales
# convert our sales data to a time series object
sales <- ts(sales$Article_ID, frequency = 9, start = c(2016,1))
class(sales)
plot(sales)
reprex()
here is the sample data.
tried using reprex, but it is not working, and R studio is restarting everytime.
Goal: I want to read the data row wise. for the 8 weeks, and then forecast next 3 weeks data. for all the Article_ID individually. firstly I want to do it for 1. Then, i will try to use a loop to do it for other articles.