lc_html | R Documentation |
lc_html
adds a block of HTML code. It uses hwrite
function
to transform some data structures (e.g. data frames) to HTML tables.
lc_html(data = list(), place = NULL, ..., chartId = NULL, with = NULL)
data |
Name-value pairs of properties passed through the |
place |
An ID of the container, where to place new chart. It will be ignored if the chart already exists. If not defined, the chart will be appended to the web page's body. |
... |
Name-value pairs of properties that will be evaluated only once and then will remain
constant. These properties can still be changed later using the |
chartId |
An ID for the chart. All charts must have unique IDs. If a chart with the same ID already
exists, it will be replaced. If ID is not defined, it will be the same as the
value of the |
with |
A dataset or a list from which other properties should be taken. If the dataset doesn't have a
column with the requested name, the variable will be searched for outside of the dataset. Must be
a |
You can read more about different properties here.
content
- HTML code to display on the page. Can also be a vector, data.frame
or
any other structure, that can be transformed to HTML by hwrite
.
Global chart settings
width
- width of the chart in pixels. By default, width will be set to fit the content.
If width is defined and it's smaller than content's width, scrolling will be possible.
heigth
- height of the chart in pixels. By default, height will be set to fit the content.
If height is defined and it's smaller than content's height, scrolling will be possible.
paddings
- padding sizes in pixels. Must be a list with all the following fields:
"top", "bottom", "left", "right"
.
## Not run: lc_html(content = "Some <b>HTML</b> <br> <i>code</i>.")
lc_html(dat(content = matrix(1:12, nrow = 4)))
data(iris)
lc_html(content = iris, height = 200)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.