| head.gtsummary | R Documentation |
These functions allow you to view the first (head()) or last (tail()) n
rows of a gtsummary table.
## S3 method for class 'gtsummary'
head(x, n = 6L, ...)
## S3 method for class 'gtsummary'
tail(x, n = 6L, ...)
x |
A |
n |
Number of rows to return. Default is |
... |
Additional arguments passed to |
A gtsummary object with only the first or last n rows in table_body.
# head() example
trial |>
tbl_summary(by = trt) |>
head(n = 2L)
# tail() example
trial |>
tbl_summary(by = trt) |>
tail(n = 2L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.