全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
8292 1
2008-04-25

用R同时做了好几个mantel test,输出的结果如下:

结果一:

Mantel statistic based on Pearson's product-moment correlation

Call:

mantel(xdis = veg.dist, ydis = env.dist)

Mantel statistic r: 0.08885

      Significance: 0.001

Empirical upper confidence limits of r:

   90%    95%  97.5%    99%

0.0365 0.0504 0.0600 0.0715

Based on 1000 permutations

结果二:

Mantel statistic based on Pearson's product-moment correlation

Call:

mantel(xdis = veg.dist, ydis = env.dist)

Mantel statistic r: 0.09283

      Significance: 0.002

Empirical upper confidence limits of r:

   90%    95%  97.5%    99%

0.0389 0.0520 0.0627 0.0732

Based on 1000 permutations

结果三:

结果四:

要想将这些结果整合成一个这样的表格,该如何操作?

如:

Site Method   90%       95%  97.5%  99%  Mantel r   Mantel sig

A  Pearson's  0.0365    0.0504 0.0600  0.0715 0.08885   0.001

B  Spearman's 0.0389    0.0520 0.0627  0.0732 0.09283   0.002

上面这张表是我手动复制做的,如果有好几个检验结果,都用这种方法来手动做表,不但麻烦而且易出错,不知有没有办法在R中生成这样的表格,再保存出来。

请高人指点,先谢谢!

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-1-22 10:30:46
先用$命令提取想要的参数,
再用data.frame()创建数据框,里面的内容是想要的参数
然后write.csv()写进表格


肯定还有更好的办法,期待高手分享~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群