tableone是帮助我们快速生成文章中table1表格的一个包,通常来说一篇SCI文章的第一个表都会给出样本的基线情况。而tableone就是可以帮我们快速地汇总描述所有样本的基线变量的一个包。
今天就给大家写写tableone,其实还有一个包叫做table1,功能差不多,以后给大家写。
实例解析
还是写一个例子帮助大家理解,用到的数据是R自带的pbc数据集。这个数据集是梅奥诊所收治的肝硬化病人的数据,共424个。
This data is from the Mayo Clinic trial in primary biliary cirrhosis (PBC) of the liver conducted between 1974 and 1984. A total of 424 PBC patients, referred to Mayo Clinic during that ten-year interval, met eligibility criteria for the randomized placebo controlled trial of the drug D-penicillamine。
这个数据集大概长这样:

现在我想要看看整个数据集的描述性分析,那么我就可以:
CreateTableOne(data = pbc)
输出如下:

看到没,所有的数值变

最低0.47元/天 解锁文章
6329





