How do you import dataframe csv into r markdown from a macbook air, it says error

my code:
crime <-read.csv("/Users/admin/Desktop/-6814322823278552920campus_crime (1).xlsx.csv")

error message: Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file '/Users/admin/Desktop/-6814322823278552920campus_crime (1).xlsx.csv': No such file or directory

Usually that message shows up when the path to the csv is incorrect, or the filename is incorrect. I can't tell what operating system you're using, but I think Linux is case sensitive. One letter off breaks the path. If you can copy the path to the csv file exactly, that might fix it.

1 Like

A similar question below. But as Hayward mentions, the core issue to getting your filepath correct.

The filename looks wrong. A suffix of "xlsx.csv" would be rather unusual.

This topic was automatically closed 21 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.