cor.test
, wilcox.test
, ks.test
, etc - into data.frame formats.# Install Github version:
devtools::install_github("gitronald/htester")
# Load the package and sample data
library(htester)
data(htests)
htest
outputs are returned in a list format that renders well in the console, but aren't ideal for writing out in table form. For example, consider the output of cor.test
:> x = rnorm(100, 100, 40)
> y = rnorm(100, 100, 40)
> cor.test(x, y, method = "spearman")
Spearman's rank correlation rho
data: x and y
S = 136820, p-value = 0.0748
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
0.1790099
> cor_test(x, y, method = "spearman")
statistic.S p.value estimate.rho null.value.rho alternative method data.name
1 136818 0.0748 0.179 0 two.sided Spearman's rank correlation rho var1 and var2
cor_test
ks_test
wilcox_test
t_test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.