install rmarkdown

I decided to try renv and now I can't install rmarkdown.

install.packages('rmarkdown') 
 install.packages('rmarkdown')
Installing rmarkdown [2.11] ...
	OK [linked cache]

But if I select the knitr button, I am asked to install rmarkdown. Of course this is an endless loop.

But this works

rmarkdown::render(here::here('Explore-Dose-Route.Rmd'), "html_document")

Do you see the error even after restarting the R session? What is the output of packageVersion("rmarkdown")?

If you need to, you can reinstall rmarkdown from CRAN with utils::install.packages("rmarkdown") -- this will bypass the renv cache.

Keven, here is some more information. I can install the packages as you indicate, but RStudio doesn't see it.

packageVersion('RMarkdown')
[1] ‘2.11’
Installing 'markdown' for R Markdown...

Retrieving 'https://cran.rstudio.com/bin/windows/contrib/4.1/markdown_1.1.zip' ...
	OK [downloaded 184.4 Kb in 0 secs]
Installing markdown [1.1] ...
	FAILED
Error installing package 'markdown':
====================================

The system cannot find the path specified.
* installing to library 'D:/Research/health/renv/staging/1'
package 'markdown' successfully unpacked and MD5 sums checked
Error: install of package 'markdown' failed [error code 1]
Traceback (most recent calls last):
14: sourceWithProgress(script = "C:/Users/hnelson3/AppData/Local/Temp/2/e241-02a5-2426-7224", 
        encoding = "UTF-8", con = stdout(), importRdata = NULL, exportRdata = NULL)
13: eval(statements[[idx]], envir = sourceEnv)
12: eval(statements[[idx]], envir = sourceEnv)
11: renv::install("markdown")
10: renv_install_impl(records)
 9: renv_install_staged(records)
 8: renv_install_default(records)
 7: handler(package, renv_install_package(record))
 6: renv_install_package(record)
 5: withCallingHandlers(renv_install_package_impl(record), error = function(e) {
        vwritef("\tFAILED")
        writef(e$output)
    })
 4: renv_install_package_impl(record)
 3: r_cmd_install(package, path)
 2: r_exec_error(package, output, "install", status)
 1: stop(error)
Execution halted

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.