code chunks run but file won't knit - no such file exists

Hi there,

I'm trying to knit an rmd file to HTML. All of the code chunks work fine, but when I knit, I get the error "Error while opening file - no such file exists." It's saying the dataframe is not found, but it works when the code chunks are tested.

I am VERY new, so I may have done something wrong, I just don't know what.

Thanks!

When knitting a document, a new environment is initiated. Nothing that is in your local environment while running the chunks interactively will still be present. Be sure to have code to read in any data that is used.

Thank you for your response! What's the best way to do that?

Currently I have read.csv("Cloud/project/Analyzing_LAN_Performance_LAN_Data")
but I keep getting "Error in file(file, "rt") : cannot open the connection"

When knitting a document, the path is relative to where the Rmd file or project file is.

It might also be good to take a look at the here package so your relative paths are always from the project root.

1 Like

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.