I am getting an error when trying to import my excel csv file into R using the read_csv function
I tried this code below
library(tidyverse)
#importing review data
review_data <- read_csv("C:\\Users\\LORA\\Documents\\R File\\project\\Romba_Reviews.csv")
and got the error message below
Error: ‘C:\Users\LORA\Documents\R File\project\Romba_Reviews.csv’ does
not exist.
I dont know where the problem is coming from, my excel file is saved in my project folder, inside the R File folder within my Documents folder.
>Solution :
-
Check if the file path is correct.
-
Make sure that the file is saved in the correct folder.
-
Try using forward slashes instead of backslashes in the file path. Sometimes, using backslashes can cause errors. You can try changing the file path to use forward slashes instead, like this:
review_data <- read_csv("C:/Users/LORA/Documents/R File/project/Romba_Reviews.csv")
If none of these solutions work, try moving the file to a different location and/or renaming the file. Sometimes, there may be issues with the file name or file location that prevent R from reading the file correctly.