Error in file(con, "rb") : cannot open the connection

Does the file name not have an extension like .csv? The command would then be

housing_census_2016 <- read_csv("C:\\Users\\Lee\\Documents\\R\\housing\\housing_census_2016.csv")

I think you get the permission denied message if you try to use read.csv on a directory.

1 Like