Learn R Programming

psyverse (version 0.2.6)

viewHTML: Display HTML

Description

This function displays HTML in the viewer, adding <body> and <head> tags (which should therefore not be included in the fragment).

Usage

viewHTML(x, title = "Psyverse", css = "body {font-size: 16px;}")

Value

Invisibly, x, with the extra HTML bits added.

Arguments

x

The HTML fragment

title

The title

css

CSS

Examples

Run this code
### Only run this example in an interactive R session,
### as it shows the HTML in the viewer.
if (interactive()) {
  psyverse::viewHTML("Hello world!");
}

Run the code above in your browser using DataLab