[Picante-commits] r118 - branches/gsoc/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 23 05:56:47 CEST 2008


Author: mrhelmus
Date: 2008-06-23 05:56:47 +0200 (Mon, 23 Jun 2008)
New Revision: 118

Modified:
   branches/gsoc/R/sppregs.R
Log:
Added code to give the overall correlations among phylogeny and occurrence

Modified: branches/gsoc/R/sppregs.R
===================================================================
--- branches/gsoc/R/sppregs.R	2008-06-22 06:45:03 UTC (rev 117)
+++ branches/gsoc/R/sppregs.R	2008-06-23 03:56:47 UTC (rev 118)
@@ -108,7 +108,12 @@
     names(cors.phylo)<-pairnames
   }
 
-  return(list(family=fam,residuals=spp.resids,coefficients=spp.coef,std.errors=spp.se,cors.pa=cors.pa,cors.resid=cors.resid,cors.phylo=cors.phylo))
+  correlations<-c(cor(cors.phylo,cors.pa,use="pairwise.complete.obs"),
+                  cor(cors.phylo,cors.resid,use="pairwise.complete.obs"),
+                  cor(cors.phylo,cors.resid-cors.pa,use="pairwise.complete.obs"))
+  names(correlations)<-c("occurence-phylo","residual-phylo","change-phylo")
+  return(list(family=fam,residuals=spp.resids,coefficients=spp.coef,std.errors=spp.se,correlations=correlations,
+              cors.pa=cors.pa,cors.resid=cors.resid,cors.phylo=cors.phylo))
 
 }
 



More information about the Picante-commits mailing list