R中的统计测试输出许多描述.虽然它们很有用,但我们如何才能输出或提取单个值?
> cor.test(x,y,method="spearman", exact=F)
Spearman's rank correlation rho
data: x and y
S = 12767993, p-value = 0.0001517
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
-0.188074
Run Code Online (Sandbox Code Playgroud)
特别是,怎么做才能得到这些值0.0001517和-0.188074所以我可以存储它们进行进一步分析?
r ×1