rstudio/htmltools
关于
Tools for HTML generation and output
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文htmltools 
Tools for creating, manipulating, and writing HTML from R.
Installation
Install the stable release of htmltools on CRAN:
install.packages("htmltools")
Install the development version with:
remotes::install_github("rstudio/htmltools")
Quick overview
{htmltools} makes it easy to customize the user interface (UI) of any Shiny or R Markdown project by using R code to generate custom HTML (including JavaScript and CSS).
This Shiny article provides a great introduction to {htmltools} (even if you're not interested in Shiny). As you'll learn in that article, the general foundation that {htmltools} provides allows other R packages (e.g., {htmlwidgets}, {crosstalk}, etc.) to provide "HTML components" in R that users can manipulate and combine in ways the component authors didn't foresee.
For example, as described in depth here, {htmltools} makes it fairly easy to arrange numerous {htmlwidgets} (e.g., {plotly} graphs) into a single static HTML webpage:
library(htmltools)
library(plotly)
browsable(tagList(
plot_ly(diamonds, x = ~carat, height = 200),
plot_ly(diamonds, x = ~price, height = 200)
))
Also, thanks to tagQuery(), it is fairly easy to query and manipulate the underlying HTML structure of components. See the tagQuery() article to learn more.
Learn more
If you're looking to learn how to build more custom user interfaces by writing custom HTML/JavaScript/CSS, we recommend the following resource:
- Shiny's UI and extensions articles
- Outstanding UI with Shiny by David Granjon
- JavaScript for R by John Coene
探索相关项目
加载中…