`File does not exist` error - possibly connected with R 3.5.0 update

After having severe issues with installing packages after updating to R 3.5.0, I am now running into issues with knitr as well.

My current code chunk looks like this:

 ```{r Reading Data}

library(openxlsx)
library(dplyr)
NWTdf <- read.xlsx("valid/path/file.xlsx", na.strings = c("x", "-"))

```

(I put the call for the libraries into this code chunk after something that I read on errors with knitr, which should fix things.... it doesn't...)
When trying to knit the document, I get an error

Error in read.xlsx.default("valid/path/file.xlsx", na.strings = c("x", : File does not exist. Calls: ... withVisible -> eval -> eval -> read.xlsx -> read.xlsx.default execution stopped.

Some wording might be a little off, because I translated it into English, but the overall meaning should still be clear enough.

It would be fantastic if this could be fixed (as well as all the other problems the update to R 3.5.0 has caused for many people).
Thanks!

Some steps to figure out your issue:

1.Make sure you set the right path of your excel file.
2.Use your R console or R script to test your code before your put all of them to Rmd chunk. If you get the same error message, the knitr package should works fine for you.
3.You can also try other package as below.

install.packages("readxl")
install.packages("xlsx")
1 Like