Skip to content
Prev 13653 / 15075 Next

Problem with read.table in my Mac. "No such file or directory"

Thanks.  I switched from years using PCs about a year ago when MS would no longer support Windows 7.  I have missed seeing extensions on files (probably .txt for this one).  It?s good to learn that I can change that.

From: Bryan Hanson <hanson at depauw.edu>
Date: Saturday, February 13, 2021 at 3:37 PM
To: Parkhurst, David F. <parkhurs at indiana.edu>
Cc: r-sig-mac at r-project.org <r-sig-mac at r-project.org>
Subject: Re: [R-SIG-Mac] Problem with read.table in my Mac. "No such file or directory"
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