I am relatively new to using R, and would like to knit my outputs from my RStudio markdown to a html/pdf.
I have installed and loaded all packages I am using in the console (this includes Knitr, dplyr and magrittr), but when I press the "knit" buttom on the top left of the screen, I get the following error:
Calls: ... handle -> withCallingHandlers -> withVisible -> eval -> eval
In addition: Warning message:
In knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, :
The file "Updated-survival-analysis-from-paul.rmd" should be encoded in UTF-8. Now I will try to read it with the system native encoding (which may not be correct). We will only support UTF-8 in the near future. Please see https://yihui.name/en/2018/11/biggest-regret-knitr/ for more info.
Execution halted
I have tried re-installing dplyr and magrittr, but, it still does not seem to work. I also do beleieve my file is encoded in UTF-8, and have not always gotten that error. Does anyone have any ideas, as to how to fix this?
Hello, I have the same problem. I have loaded all the necessary libraries in a code chunk in my rmd file but this error still pops up. Any idea why this happened and how I can fix this?
Hi, welcome!
Could you give us the detailed steps to reproduce your issue? Have in mind that libraries need to be loaded on each new R session, not just included on a code chunk, and that a code chunk can be configured to not to be run.
Hi,
Thank you for your quick support. Turns out I have an extra pipe symbol %>% at the end of the code that I did not notice. I have finally sorted it out.