Preview does not work after knitting .Rmd from within project but when knitting out of project

Hi everybody

I wrote a html_document with the following YAML:

output:
html_document:
code_folding: hide
toc: true
toc_float: true
toc_depth: 4
number_sections: true
df_print: paged
theme: sandstone
self_contained: no

knit: (function(input, ...) {
rmarkdown::render(
input,
output_file = paste0(
xfun::sans_ext(input), '-', Sys.Date(), '.html'
),
envir = globalenv(),
output_dir = "~analyses/allData/results/"
)
})

When knitting out of a .Rproj everything works perfect.
When knitting from within an .Rproj it creates the .html output but it fails to open the viewer. Viewer settings are identical for both trials and nothing else changed. Within the specific project I can knit another .Rmd and then preview works fine...
Creating a new project does not help...the specific .Rmd - file never opens in Preview when knitting from within any Rproject.

Anyone already had this issue?

Thanks in advance :slight_smile:

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.