问题描述
大多数情况下,统计检验的结果是 list
。我知道我只能将 kable
与数据框一起使用。以下示例是 Kolmogorov-Smirnov
测试 (ks.test)。 psych
图书馆也有很多。
我想要更好的输出编织到 Word
。如何使用 a
之类的列表完成此操作?
---
title: "ks test"
output:
word_document: default
---
```{r setup,include=FALSE}
library(knitr)
knitr::opts_chunk$set(echo = TRUE,results="asis")
```
```{r}
x <- rnorm(50)
y <- runif(30)
# Do x and y come from the same distribution?
a <- ks.test(x,y)
a
```