[R-SIG-Mac] Problem with read.table in my Mac. "No such file or directory"

Parkhurst, David F. p@rkhur@ @end|ng |rom |nd|@n@@edu
Sat Feb 13 21:43:31 CET 2021


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 using depauw.edu>
Date: Saturday, February 13, 2021 at 3:37 PM
To: Parkhurst, David F. <parkhurs using indiana.edu>
Cc: r-sig-mac using r-project.org <r-sig-mac using 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

> 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

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list