write.csv(counts, file = '~C:/Users/ADHP-GCRO/Documents/R/cyclistic_bike-share_analysis/avg_ride_length.csv/avg_ride_length.csv')
Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
cannot open file '~C:/Users/ADHP-GCRO/Documents/R/cyclistic_bike-share_analysis/avg_ride_length.csv/avg_ride_length.csv': Invalid argument
I see one definite problem and another thing that I question with your file path
'~C:/Users/ADHP-GCRO/Documents/R/cyclistic_bike-share_analysis/avg_ride_length.csv/avg_ride_length.csv'
The ~ at the beginning means "the home directory". You cannot place that in front of a full file path that starts with C:/. Remove the ~.
The file path ends with /avg_ride_length.csv/avg_ride_length.csv'
Do you really have a folder named avg_ride_length.csv or have you mistakenly listed the file name twice?
No I don't. I thought the code is supposed to create the file with the name avg_ride_length.csv
I also later used the below quoted code and it created the file in the specified file directory.
Thanks so much
write.csv( counts_1,"C:/Users/ADHP-GCRO//Documents//R//cyclistic_bike-share_analysis//avg_ride_length.csv")
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.