[Picante-commits] r140 - in branches/gsoc: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jul 19 02:51:58 CEST 2008


Author: skembel
Date: 2008-07-19 02:51:58 +0200 (Sat, 19 Jul 2008)
New Revision: 140

Modified:
   branches/gsoc/DESCRIPTION
   branches/gsoc/R/sppregs.R
Log:
Minor 0.3 fixes before merging back to trunk

Modified: branches/gsoc/DESCRIPTION
===================================================================
--- branches/gsoc/DESCRIPTION	2008-07-18 06:35:28 UTC (rev 139)
+++ branches/gsoc/DESCRIPTION	2008-07-19 00:51:58 UTC (rev 140)
@@ -6,6 +6,6 @@
 Author: Steve Kembel <skembel at berkeley.edu>, David Ackerly <dackerly at berkeley.edu>, Simon Blomberg <s.blomberg1 at uq.edu.au>, Peter Cowan <pdc at berkeley.edu>, Matthew Helmus <mrhelmus at wisc.edu>, Cam Webb <cwebb at oeb.harvard.edu>
 Maintainer: Steve Kembel <skembel at berkeley.edu>
 Depends: ape, vegan
-Suggests: circular
+Suggests: brglm, circular
 Description: Phylocom integration, community analyses, null-models, traits and evolution in R
 License: GPL-2

Modified: branches/gsoc/R/sppregs.R
===================================================================
--- branches/gsoc/R/sppregs.R	2008-07-18 06:35:28 UTC (rev 139)
+++ branches/gsoc/R/sppregs.R	2008-07-19 00:51:58 UTC (rev 140)
@@ -1,6 +1,4 @@
 sppregs<-function(samp,env,tree=NULL,fam="gaussian"){
-
-  #require(brglm)           #require the brglm library that fits logistic regression with Firth Correction
   
   if(is.null(tree))
   {
@@ -68,6 +66,11 @@
       cors.resid<-cor(spp.resids)[lower.tri(cor(spp.resids))]  #a vector of residual correlations among species
 
   } else {
+  
+    if (!require(brglm)) {
+        stop("The 'brglm' package is required to use this function with argument fam=binomial.")
+    }
+
     samp[samp>0]<-1             #make samp a pa matrix
     for(i in 1:nspp)
     {



More information about the Picante-commits mailing list