I am conducting a time series analysis and generating a graph for different suburbs with different quarterly sales spanning three decades. All the csv files for these suburbs are saved separately with a 'period' column and 'quarterly sale price' column. The coding for all these suburbs is going to be the same. However, a new script for suburb 'b' is not able to locate the csv files saved in the same folder for the analysis done for the previous suburb 'a'.
#this file loads the quarterly median house sales for suburb 'a'
rm(list=ls())
library(fpp2)
data <-read.csv("c:/users/dell/desktop/analysis/suburb a - deflated.csv")
Y <-ts(data[,2],start=c(1990),end=c(2021),frequency=4)
autoplot(Y) + ggtitle("Time Plot: Median House Sales Per Quarter- Adelaide") + ylab("Median Sale Price")
error for suburb 'b':
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'c:/users/dell/desktop/analysis/suburb b - deflated.csv': No such file or directory
edit: I am very new to R, I am not from this field so this coding was generated from looking at similar videos on youtube