Updated version of markdown package required

Hi all

If I try to use the Knit button or create a new RMarkdown document, I am prompted to install an updated version of the markdown package (note: the error indicates RStudio is looking for the 'markdown' package - NOT the 'rmarkdown' package).

If create an RMarkdown document manually and use rmarkdown::render() to knit, everything works as expected.

Any suggestions?

I don't have permissions to install packages so I wonder if a symbolic link or something else has gone astray somewhere along the line.

I'm using Windows, RStudio 2021.09.2, R 4.1.2 and rmarkdown 2.11, in case that helps.

Many thanks

1 Like

The package markdown is outdated as stated by the authors in https://github.com/rstudio/markdown.
And the software you use is quite recent, I think.
So no dependence on markdown is to be expected from that side.
Apart from an 'error in the error-message', the only explanation I can think of is some reference to the package markdown in your own code.

As far as I understand, pressing the Knit button leads to executing rmarkdown::render().
This standard behaviour can be changed by specifying in the YAML section how to want the knit to be done:

knit                : (function (...) { source('myknit.R'); myknit(...) })

Probably you did not use this.
But maybe this helps and otherwise it could trigger other forum members to give it a thought.
Good luck!

In case you are using the Pro Products, we have added an environment variable in the latest Release that will programmatically disable version checks and hence RStudio will not force you to upgrade packages.


You can set this in rsession-profile.

Note: This will not only disable package version check. In case the respective mandatory package is not installed at all, it will fail.

As explained by @michaelmayer , this package is still required by the RStudio IDE for the Knit button feature.
The package is stated among all the required dependencies for RStudio in RStudio server pro doc to have 100% features working: RStudio Workbench Administration Guide - Appendix C — R Package Dependencies

There is an issue open to remove this as this is no more a dependency of rmarkdown as it used to be.

So you would need to install the package for the button to work until this is resolved, or you can do what @michaelmayer explained.

Can you ask for the package to be installed ? How do you do for other packages you would need to have ?
I see you are on Windows, is it a local computer ? Installing a package does not require any special right as it should be installed in your user environment. Did you try running install.packages("markdown") ?

Running rmarkdown::render() in R console will be the way to go until the R package is installed.


Many thanks for the helpful replies.

I haven’t defined an alternative function for the knit button in my YAML header and I’m afraid I am not using RStudio Pro.

I had asked for our IT team to install the markdown package, as for other packages, and when that was unsuccessful I switched to the rmarkdown::render() workaround. I think our IT team struggled to find a markdown package or was finding that they were being linked to the newer, rmarkdown package (R and package management for one user is unusual and can’t be their priority). My work PC is locked down so I can’t install packages as a user (and to workaround this might solve a technical problem but would create many other problems for me!).

Great to see that there is an issue raised to consider removing the dependency. In the meantime, I have a workaround, but if it gets too annoying I will follow up with the IT team again.

Thanks again

Do you know what the problem is ? Is this technical or just they did not do it yet ?

FWIW package is here: CRAN - Package markdown
But I recognized that package management in shared environment can be tricky.

Can they just unlock done so that you can run install.packages("mardkown") ?
Also, you should have user library that is not locked but if this goes against your IT rule, than I understand why you won't try it.

Running R in work environment completely close is not easy. Your IT department should help you to get unstuck on packages. Being able to update packages is something important IMO, and something that they can rely on maybe.

As available resource to help "know R world" better, there is this short online book

And if they want to help on offering controlled environment (and not connect you to CRAN directly), this can be also useful resource:

Anyway, I hope you'll be able to have this package install. Hopefully, it will be fixed soon in the IDE, but you'll need an update too is that happens.

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.