mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
Deploying to gh-pages from @ agdamsbo/FreesearchR@54dd332cd8 🚀
This commit is contained in:
parent
4cf4bd0499
commit
6d545337de
328 changed files with 12930 additions and 1662 deletions
148
reference/baseline_table.md
Normal file
148
reference/baseline_table.md
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
# Print a flexible baseline characteristics table
|
||||
|
||||
Print a flexible baseline characteristics table
|
||||
|
||||
## Usage
|
||||
|
||||
``` r
|
||||
baseline_table(
|
||||
data,
|
||||
fun.args = NULL,
|
||||
fun = gtsummary::tbl_summary,
|
||||
vars = NULL
|
||||
)
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- data:
|
||||
|
||||
data set
|
||||
|
||||
- fun.args:
|
||||
|
||||
list of arguments passed to
|
||||
|
||||
- fun:
|
||||
|
||||
function to
|
||||
|
||||
- vars:
|
||||
|
||||
character vector of variables to include
|
||||
|
||||
## Value
|
||||
|
||||
object of standard class for fun
|
||||
|
||||
## Examples
|
||||
|
||||
``` r
|
||||
mtcars |> baseline_table()
|
||||
|
||||
|
||||
|
||||
|
||||
Characteristic
|
||||
```
|
||||
|
||||
**N = 32**¹
|
||||
|
||||
mpg
|
||||
|
||||
19.2 (15.4, 22.8)
|
||||
|
||||
cyl
|
||||
|
||||
|
||||
|
||||
4
|
||||
|
||||
11 (34%)
|
||||
|
||||
6
|
||||
|
||||
7 (22%)
|
||||
|
||||
8
|
||||
|
||||
14 (44%)
|
||||
|
||||
disp
|
||||
|
||||
196 (121, 334)
|
||||
|
||||
hp
|
||||
|
||||
123 (96, 180)
|
||||
|
||||
drat
|
||||
|
||||
3.70 (3.08, 3.92)
|
||||
|
||||
wt
|
||||
|
||||
3.33 (2.54, 3.65)
|
||||
|
||||
qsec
|
||||
|
||||
17.71 (16.89, 18.90)
|
||||
|
||||
vs
|
||||
|
||||
14 (44%)
|
||||
|
||||
am
|
||||
|
||||
13 (41%)
|
||||
|
||||
gear
|
||||
|
||||
|
||||
|
||||
3
|
||||
|
||||
15 (47%)
|
||||
|
||||
4
|
||||
|
||||
12 (38%)
|
||||
|
||||
5
|
||||
|
||||
5 (16%)
|
||||
|
||||
carb
|
||||
|
||||
|
||||
|
||||
1
|
||||
|
||||
7 (22%)
|
||||
|
||||
2
|
||||
|
||||
10 (31%)
|
||||
|
||||
3
|
||||
|
||||
3 (9.4%)
|
||||
|
||||
4
|
||||
|
||||
10 (31%)
|
||||
|
||||
6
|
||||
|
||||
1 (3.1%)
|
||||
|
||||
8
|
||||
|
||||
1 (3.1%)
|
||||
|
||||
¹ Median (Q1, Q3); n (%)
|
||||
|
||||
mtcars \|\> baseline_table(fun.args =
|
||||
[list](https://rdrr.io/r/base/list.html)(by = "gear"))
|
||||
|
||||
[TABLE]
|
||||
Loading…
Add table
Add a link
Reference in a new issue