Skip to content

markdown package is no more required to render a Rmd document but still asked by Knit button #9861

Closed

Description

@cderv

Filling this here as an issue following @ronblum request

I know the IDE is keeping track of required R dependencies and force to install missing or outdated versions.
I believe this is tracked here: https://github.com/rstudio/rstudio/blob/main/src/cpp/session/resources/dependencies/r-packages.json

Just so you know, last version of knitr 1.34 has moved the markdown package from Import to Suggest. So markdown package is no more a hard dependency.

I believe this is causing the behavior I am seeing:

  • Create a new renv project with rmarkdown document
  • Install packages with last CRAN versions - markdown package won't be install anymore
  • Restart the project using the isolated renv library where markdown is not there.
  • Try to knit the document using the IDE button - a message from the IDE ask me to install the markdown package.
  • This package is no more required and rmarkdown::render() works ok to build the doc.

This is not really an issue because the markdown can be installed safely (by anwsering yes to install when IDE is asking).
However I don't know how the dependency graph is working but it could be suprising / puzzling for user to have a missing package after a successful install.packages("rmarkdown"). So maybe in a future version, the requirement could be often when knitr 1.34 is used.
Or maybe it used in another place in the IDE.

Anyway, just wanted to inform you of this change in knitr

System details

RStudio Edition : Desktop [Open Source]
RStudio Version : 2021.11.0.33 (can't update yet to new daily) 
OS Version      : Windows 10 x64 (build 19043)
R Version       : R version 4.1.1 (2021-08-10)

Activity

  1. cderv commented on Mar 23, 2022

    @cderv
    CollaboratorAuthor
  2. eitsupi commented on Aug 31, 2022

    @eitsupi

    Hello.
    New users may not know that the markdwon package exists (I didn't before either), so this popup may cause them to fear that they have failed to install the rmarkdown package. (e.g. rocker-org/rocker-versioned2#525)
    It would be great to see this issue resolved.

  3. cderv commented on Aug 16, 2023

    @cderv
    CollaboratorAuthor

    New users may not know that the markdwon package exists (I didn't before either), so this popup may cause them to fear that they have failed to install the rmarkdown package

    new occurrence of this situation at https://community.rstudio.com/t/error-when-opening-creating-new-r-markdown-document/171067

  4. eliocamp commented on Oct 5, 2023

    @eliocamp

    Another recorder occurrence: rstudio/renv#1708

  5. modified the milestones: Later, Ocean Storm on Oct 5, 2023
  6. self-assigned this
    on Oct 5, 2023
  7. jeremy-allen commented on Oct 12, 2023

    @jeremy-allen

    Happens to me daily. Would love a fix. Happened during a live demo this week and caused many questions from the audience.

  8. ronblum commented on Oct 18, 2023

    @ronblum
    Contributor

    Verified in RStudio Desktop 2023.12.0-daily+196 on MacOS 14, using the steps in the initial post, that

    1. Creating an R Markdown files no longer includes installing markdown.
    2. Clicking on the knit button doesn't trigger a request to install markdown or any other package.

    Then double-checked and opened the same project in 2023.09.1+478 and confirmed that markdown is still required.

  9. self-assigned this
    on Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions