System cannot find file specified

Hi there
I am working through the' Getting started with R: an introduction for biologists' book. I am currently trying to compile my scripts into html format using R markdown, and I keep getting an "Error while opening file: The system could not find the file specified" error message. My code runs fine, so RStudio can find the data, but as soon as it comes to compiling it, it has a problem. Under the render tab of the console, it says: Line 8: Error: [file path for data] does not exist in current working directory [file path where R script is saved]. Line 8 refers to a line of code which just say library(readr), not even a file path. I have tried copying the data csv file into the folder where the script is saved but nothing has worked so far. Any help is appreciated! Thanks

Hi, welcome to the community forum.

We will need to see your code and some sample data.
FAQ: How to do a minimal reproducible example ( reprex ) for beginners

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need.

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.