19.5 Multiple pages

You can link to other Shiny documents by using the Markdown link syntax and specifying therelative path to the document, e.g.,[Another Shiny Document](another.Rmd). If you click the link to another Rmd document on one page, that Rmd document will be launched as the current interactive Shiny document.

Currently, only one document can be active at a time, so documents cannot easily share state, although some primitive global sharing is possible via the R scriptglobal.R (see the help page?rmarkdown::run).

By default, it is only possible to link to R Markdown files in the same directory subtree as the file on whichrmarkdown::run() was invoked (e.g., you cannot link to../foo.Rmd). You can use thedir argument ofrmarkdown::run() to indicate the directory to be treated as the root.