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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jul 18 08:35:29 CEST 2008


Author: mrhelmus
Date: 2008-07-18 08:35:28 +0200 (Fri, 18 Jul 2008)
New Revision: 139

Modified:
   branches/gsoc/R/sppregs.R
Log:
edited sppregs file to use glm as default and changed function name plot.sppregs to sppregs.plot 

Modified: branches/gsoc/R/sppregs.R
===================================================================
--- branches/gsoc/R/sppregs.R	2008-07-18 06:34:23 UTC (rev 138)
+++ branches/gsoc/R/sppregs.R	2008-07-18 06:35:28 UTC (rev 139)
@@ -1,6 +1,6 @@
-sppregs<-function(samp,env,tree=NULL,fam="binomial"){
+sppregs<-function(samp,env,tree=NULL,fam="gaussian"){
 
-  require(brglm)           #require the brglm library that fits logistic regression with Firth Correction
+  #require(brglm)           #require the brglm library that fits logistic regression with Firth Correction
   
   if(is.null(tree))
   {
@@ -123,7 +123,7 @@
 
 }
 
-plot.sppregs<-function(sppreg,rows=c(1,3),cex.mag=1,x.label="phylogenetic correlations",y.label=c("occurrence correlations w/ env","occurrence correlations wo/ env","change in correlations")){
+sppregs.plot<-function(sppreg,rows=c(1,3),cex.mag=1,x.label="phylogenetic correlations",y.label=c("occurrence correlations w/ env","occurrence correlations wo/ env","change in correlations")){
   par(mfrow=rows,las=1,cex=cex.mag)
   plot(sppreg$cors.phylo,sppreg$cors.pa,xlab=x.label,ylab=y.label[1],main=paste("cor =",round(cor(sppreg$cors.phylo,sppreg$cors.pa,use="pairwise.complete.obs"),4)))
   abline(0,0,lty=2)



More information about the Picante-commits mailing list