0

This is my code

dat <- read.csv("../rawdata/uscrime.csv")

and this is the error I am getting

Error in file(file, "rt") : cannot open the connection

why won't it open my file?

I have done this several times in other projects but now that I have started a new project I can't get it to work.

Z.Lin
  • 28,055
  • 6
  • 54
  • 94
kn253
  • 1
  • 1
    Are you sure the file is in that location? You are using a relative file path, so it may help to check where your current working directory is (you can do so by entering `getwd()` in the console). – Z.Lin Apr 28 '19 at 03:04
  • 2
    Possible duplicate of [Getting error in file(file, "rt"): cannot open the connection](https://stackoverflow.com/questions/49090622/getting-error-in-filefile-rt-cannot-open-the-connection) – NelsonGon Apr 28 '19 at 06:10
  • Look at the second answer in the linked post. – NelsonGon Apr 28 '19 at 06:10

0 Answers0