shiny (version 0.2.3)

includeHTML: Include Content From a File

Description

Include HTML, text, or rendered Markdown into a Shiny UI.

Usage

includeHTML(path)
  includeText(path)
  includeMarkdown(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.

Details

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

Examples

Run this code
doc <- tags$html(
  tags$head(
    tags$title('My first page')
  ),
  tags$body(
    h1('My first heading'),
    p('My first paragraph, with some ',
      strong('bold'),
      ' text.'),
    div(id='myDiv', class='simpleDiv',
        'Here is a div with some attributes.')
  )
)
cat(as.character(doc))

Run the code above in your browser using DataCamp Workspace