Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

include

Include Content From a File


Description

Load HTML, text, or rendered Markdown from a file and turn into HTML.

Usage

includeHTML(path)

includeText(path)

includeMarkdown(path)

includeCSS(path, ...)

includeScript(path, ...)

Arguments

path

The path of the file to be included. It is highly recommended to use a relative path (the base path being the Shiny application directory), not an absolute path.

...

Any additional attributes to be applied to the generated tag.

Details

These functions provide a convenient way to include an extensive amount of HTML, textual, Markdown, CSS, or JavaScript content, rather than using a large literal R string.

Note

includeText escapes its contents, but does no other processing. This means that hard breaks and multiple spaces will be rendered as they usually are in HTML: as a single space character. If you are looking for preformatted text, wrap the call with pre, or consider using includeMarkdown instead.

The includeMarkdown function requires the markdown package.


htmltools

Tools for HTML

v0.5.1.1
GPL (>= 2)
Authors
Joe Cheng [aut], Carson Sievert [aut, cre] (<https://orcid.org/0000-0002-4958-2844>), Winston Chang [aut], Yihui Xie [aut], Jeff Allen [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.