rbindl_rtables | R Documentation |
TableTree
and related objectsRow-bind TableTree
and related objects
rbindl_rtables(
x,
gap = lifecycle::deprecated(),
check_headers = lifecycle::deprecated()
)
## S4 method for signature 'VTableNodeInfo'
rbind(..., deparse.level = 1)
## S4 method for signature 'VTableNodeInfo,ANY'
rbind2(x, y)
x |
( |
gap |
|
check_headers |
|
... |
( |
deparse.level |
( |
y |
( |
A formal table object.
When objects are row-bound, titles and footer information is retained from the first object (if any exists) if all
other objects have no titles/footers or have identical titles/footers. Otherwise, all titles/footers are removed
and must be set for the bound table via the formatters::main_title()
, formatters::subtitles()
,
formatters::main_footer()
, and formatters::prov_footer()
functions.
mtbl <- rtable(
header = rheader(
rrow(row.name = NULL, rcell("Sepal.Length", colspan = 2), rcell("Petal.Length", colspan = 2)),
rrow(NULL, "mean", "median", "mean", "median")
),
rrow(
row.name = "All Species",
mean(iris$Sepal.Length), median(iris$Sepal.Length),
mean(iris$Petal.Length), median(iris$Petal.Length),
format = "xx.xx"
)
)
mtbl2 <- with(subset(iris, Species == "setosa"), rtable(
header = rheader(
rrow(row.name = NULL, rcell("Sepal.Length", colspan = 2), rcell("Petal.Length", colspan = 2)),
rrow(NULL, "mean", "median", "mean", "median")
),
rrow(
row.name = "Setosa",
mean(Sepal.Length), median(Sepal.Length),
mean(Petal.Length), median(Petal.Length),
format = "xx.xx"
)
))
rbind(mtbl, mtbl2)
rbind(mtbl, rrow(), mtbl2)
rbind(mtbl, rrow("aaa"), indent(mtbl2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.