Error in file (file,"rt")

I ran this code to read file but got error:
daily_activity<-read.csv("C:/Users/harsh/Downloads/archive (3)/Fitabase Data 4.12.16-5.12.16/dailyActivity_merged.csv")
Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'C:/Users

It looks like your error message is truncated. My bet is that the full error message is:

Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
  cannot open file 'C:/Users/harsh/Downloads/archive (3)/Fitabase Data 4.12.16-5.12.16/dailyActivity_merged.csv': No such file or directory

which indicates that the file does not exist, for example there might be a typo in the path.

I still couldn't figure out , changed paths and then deleted the file, downloaded again.
and then finally i just imported the file to R studio and then read the file . Just got it right!

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.