19.5 Multiple pages

You can link to other Shiny documents by using the Markdown link syntax and specifying the relative 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 script global.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 which rmarkdown::run() was invoked (e.g., you cannot link to ../foo.Rmd). You can use the dir argument of rmarkdown::run() to indicate the directory to be treated as the root.