The error message you're seeing suggests that R is unable to find the file "00_raw_data/4-foodbalances-usa-fao-1961-2013-01272023.xlsx" at the location where it's looking. One possible reason for this is that the working directory of your R script is different from the location of your R project. The working directory is the location where R looks for files by default, and it can be set using the setwd() function or by navigating to the desired location in the RStudio file pane.
You can check your working directory by running getwd() in your R script. To change it, you can use setwd("path/to/directory") where you replace the path/to/directory with the directory where your data file is located.
Another possible reason is that the file is not in the right location, check if the file is in the right folder,
Also, you can try to use the full path of your file instead of the relative path.
If the above suggestions did not help, please let me know the exact file location in your computer, so that I can help you with the solution.
Thank you so much for your reply. I checked the working directory of R: it was directed to the R.Project's folder. About full vs relative path, my intention is to use the relative path. So that this project can be portable to others.
I did not understand what you mean by not having the file in the right location. I have created multiple folders inside the RProject, one for raw data, one for tidy data, one for R code, etc.
I am trying to read my raw data from its corresponding folder, 00_raw_data.