PLS HELP I am very new to R. I am currently trying trying to read a CSV file but keep getting the same error.

Every time I attempt to read a CSV file (which I downloaded from Google Trends) I get the following error seen in the code below. I have researched and nothing has really helped me so far. The CSV file is showing up in my working directory and I am unsure what else to do to fix it. Here is the error message:

Error in file(file, "rt") : cannot open the connection
3. file(file, "rt")
2. read.table(file = file, header = header, sep = sep, quote = quote, dec = dec, fill = fill, comment.char = comment.char, ...)

  1. read.csv("KrogerWalmart.csv")

Hi, What if you use the full path? e.g. read.csv(r"(C:\Users\username\Documents\KrogerWalmart.csv)")

Otherwise, projects are the way to go. https://support.posit.co/hc/en-us/articles/200526207-Using-RStudio-Projects

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.