Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 447

How to use tableone to change table percentage by row?

$
0
0

I am use library(tableone) to make my descriptive statistics for multiple variablesThis is my code:

library(tableone)myVars <- c("class", "age", "Sex", "bmi", "bmi_category","drink_freq", "smoke_yn", "edu_dummy")catVars <- c("class", "Sex", "bmi_category","drink_freq", "smoke_yn", "edu_dummy")tab1_inf <- CreateTableOne(vars = myVars, strata = "NEWDI",                             data = TKA_table1, factorVars = catVars)a1 <- print(tab1_inf, exact = "NEWDI", showAllLevels = TRUE)

This it default for percentage, and I want change it format like this(example):enter image description here

I checked its description and found no options to set.https://rdrr.io/cran/tableone/man/print.TableOne.htmlHow can I do it?


Viewing all articles
Browse latest Browse all 447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>