我用一个自定义容器构建了一个<a href="/" onclick="event.preventDefault()">here</a>
表,类似于一个here(第2.6-2.6个自定义表容器)。我正在打包使用该表的闪亮应用程序,我想找出用于定义DT
对象的哪些软件包th()
,tr()
和thead()
, 属于..?
sketch
等。为我指出了各种??thead
函数,但是DT
没有返回任何文档。感谢您的指导!
答案 0 :(得分:1)
您应该注意,在草图的定义中,它们称为iris %>%
group_by(Species) %>%
summarise_if(.predicate = is.numeric,
.funs = ~ list(summary(object = .))) %>%
unnest() %>%
group_by(Species) %>%
mutate(Statistic = names(x = summary(object = rnorm(n = 1)))) %>%
ungroup() %>%
select(Species, Statistic, everything())
,这很简单
htmltools::withTags
要注意的是它将使用替代和function (code)
{
eval(substitute(code), envir = as.list(tags), enclos = parent.frame())
}
<bytecode: 0x000001c832d09200>
<environment: namespace:htmltools>
。如果我们看一下envir = as.list(tags)
,它是带有以下命名对象/函数的列表:
tags
其中的每一个都具有基本相同的形式:
> names(tags)
[1] "a" "abbr" "address" "area" "article" "aside" "audio"
[8] "b" "base" "bdi" "bdo" "blockquote" "body" "br"
[15] "button" "canvas" "caption" "cite" "code" "col" "colgroup"
[22] "command" "data" "datalist" "dd" "del" "details" "dfn"
[29] "div" "dl" "dt" "em" "embed" "eventsource" "fieldset"
[36] "figcaption" "figure" "footer" "form" "h1" "h2" "h3"
[43] "h4" "h5" "h6" "head" "header" "hgroup" "hr"
[50] "html" "i" "iframe" "img" "input" "ins" "kbd"
[57] "keygen" "label" "legend" "li" "link" "mark" "map"
[64] "menu" "meta" "meter" "nav" "noscript" "object" "ol"
[71] "optgroup" "option" "output" "p" "param" "pre" "progress"
[78] "q" "ruby" "rp" "rt" "s" "samp" "script"
[85] "section" "select" "small" "source" "span" "strong" "style"
[92] "sub" "summary" "sup" "table" "tbody" "td" "textarea"
[99] "tfoot" "th" "thead" "time" "title" "tr" "track"
[106] "u" "ul" "var" "video" "wbr"
因此,从根本上讲,这只是一种使用指定标记调用> tags$thead
function (...)
tag("thead", list(...))
<bytecode: 0x000001c82c4a2678>
<environment: namespace:htmltools>
函数的简便方法。直接调用示例:
tag