My Rmd doesn´t knit

At the moment when I want to Knit Rmarkdown, doesn´t do nothing. Even with the defatult screen when you start. I have R 4.2.0

In your yaml you specify pdf_document first.
If I remember correctly this means that an pdf document will be produced when you press the knit-button.
The process of creating a pdf document is a little more involved than creating a html document.

Therefore start with removing the line with pdf_document and try to knit.
If that works fine and produces a html document you will know that your .Rmd file is okay. If the knit fails again let us know and mention the messages you see in the Render panel.

If everything is fine until then, then insert the line that you removed and try again.
And again let us know which messages appear in the Render panel in case of a failure.

If you never before created a pdf file on your current computer, it could be that a LaTeX compiler was not yet installed on that computer. In that case try using the tinytex package that can help you to install one.
Note that installing tinytex is not sufficient : use the function tinytex::install_tinytexto actually install the LaTeX compiler TinyTeX, a custom LaTeX distribution based on TeX Live.

From start 0, I install tinytex and try knit but still nothing.

Hello @ElCortez ,

I think it is good practice never to install packages in a knitr-document.
Sometimes interaction is required when installing and that is not always available in the knit process.

So remove the 'packages' chunk from your document and try to knit (only) the html document.
I think that should work, but if not then let us know.

From your screenprint it seems that the tinytex package has been installed.
But I think it will not hurt to do it again in the console (not in the document).
After that do the tinytex::install_tinytex() in the console to install the distribution. It could be that you get a message that LaTeX distribution already exists. If you are not aware of such distribution (as I expect you are not) type Y when asked to continue.

Let us know how you get on.

1 Like

Still the same, it doesn´t knit.


I am sorry to hear that.
To be sure: you mean that also the html document is not generated?

In the path of the first printscreen I see the word OneDrive.
I am not sure if and how OneDrive files are supported in R.
The easiest way to check if your errors are related to the use of OneDrive is to copy the Rmd file to a local file ( a file on a hard disk on your computer, not a network file).

However in the same first printscreen I looks like the install of Tex Live on a local file is starting with downloading files. For a full install I would expect packages to be installed (but maybe this is not done related to a previous installation).

So please check if working with a local file to create an html document works.
If that works we can try to find a way to work with OneDrive files.

EDIT: also see https://community.rstudio.com/t/cant-save-r-rstudio-scripts-on-onedrive-windows-rstudio-error/129280

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.