[R-SIG-Mac] Problem with read.table in my Mac. "No such file or directory"
Bryan Hanson
h@n@on @end|ng |rom dep@uw@edu
Sat Feb 13 21:37:25 CET 2021
Try
list.files()
to see the names of the files in the current directory, and make certain you are where you think you are, the file is there, has the name you think it has etc. You may need to add the extension, presumably something like “.csv” to your read.table call.
A possible point of confusion is that you may have your Mac set to not display file extensions, and life is generally easier in my opinion if those extensions are turned on. Plenty of advice on the internet as to how to turn this on for all files.
Bryan
> On Feb 13, 2021, at 1:29 PM, Parkhurst, David F. <parkhurs using indiana.edu> wrote:
>
> I’m still having trouble with read.table, as follows (and there IS a plain text document called moabsitechem in this directory:
>> getwd()
> [1] "/Users/DFP/Documents/Documents - David’s iMac/ae/FriendsMonroe"
>> read.table("moabsitechem")
> Error in file(file, "rt") : cannot open the connection
> In addition: Warning message:
> In file(file, "rt") :
> cannot open file 'moabsitechem': No such file or directory
>
> How can I fix this problem?
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
More information about the R-SIG-Mac
mailing list