With R Markdown, I would like to set the title of the document and it depends on R code that will be run inside this Rmd file.
So I try to use javascript to set the title.
I tried this following code, but it doesn't work:
document.title = "`r title_value`";
I think that I should to find the correct way to set the title. For example, to change the text in the navbar, I succeded with the following code:
document.querySelector(".navbar-header > span.navbar-brand").innerHTML = "`r title_value`";