Closed ACCarsh closed 6 years ago
I figured out why it wasn't working. The file path was not properly written to move to the parent directory of the docs folder (aka the project folder) before searching for the data folder. Now that it has been added, things seem to be working fine.
For the first part of the assignment, I had written the code:
suppressPackageStartupMessages(library(tidyverse)) combined <- read_csv("https://ndownloader.figshare.com/files/2292169") write_csv(combined,"data/combined.csv")
This was all within an {r} chunk. When I ran it by itself to get the csv file, everything ran without issue. However, when I then tried knitting the file, it returned the issue:
"Quitting from lines 10-15 (w7_assignment_ACC.Rmd) Error in open.connection(path, "wb") : cannot open the connection Calls: ... write_delim -> stream_delim -> open -> open.connection"
(Note: lines 10-15 are from the suppress function all the way to the end of the code chunk)
From what I can tell, this error is supposed to pop up if you are calling on a file that doesn't exist, but I would think that can't be possible if the code works fine by itself. What about this code is causing issues, and do you have any advice on how to fix it?