JiaxiangBU / tutoring2

The collection of Python and R code scripts to tutor others.
https://jiaxiangbu.github.io/tutoring2/
Other
8 stars 7 forks source link

怎么处理tableContinuous {reporttools}返回的结果 #47

Closed slsongge closed 4 years ago

slsongge commented 4 years ago

@JiaxiangBU 家翔哥

问题

用tableContinuous返回的结果,如何生成表格呢?

代码

# install.packages("reporttools")
library(reporttools)

data(CO2)
vars <- CO2[, 4:5]
group <- CO2[, "Treatment"]
weights <- c(rep(1, 60), rep(0, 10), rep(2, 14))

## display default statistics, provide neither group nor weights
tableContinuous(vars = vars, stats = c("n", "min", "mean", "median", 
    "max", "iqr", "na"), print.pval = "kruskal", 
    cap = "Table of continuous variables.", lab = "tab: descr stat")
slsongge commented 4 years ago

@JiaxiangBU 没事了哈,我下载了那个软件,几乎可以解决问题了。

JiaxiangBU commented 4 years ago

对的,mathpix 可以完成绝大部分的任务,但是还是会有一些问题。

image

\scriptsize 无法识别。

另外一个就是无法自动化,目前已经有 mathpix 的包了,可以 GitHub 找下。

@slsongge