[Vegan-commits] r1235 - in pkg/vegan: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 19 08:21:19 CEST 2010


Author: jarioksa
Date: 2010-07-19 08:21:18 +0200 (Mon, 19 Jul 2010)
New Revision: 1235

Added:
   pkg/vegan/R/veganCovEllipse.R
Modified:
   pkg/vegan/inst/ChangeLog
Log:
added internal function for covariance ellipse

Added: pkg/vegan/R/veganCovEllipse.R
===================================================================
--- pkg/vegan/R/veganCovEllipse.R	                        (rev 0)
+++ pkg/vegan/R/veganCovEllipse.R	2010-07-19 06:21:18 UTC (rev 1235)
@@ -0,0 +1,9 @@
+`veganCovEllipse` <-
+    function(cov, center = c(0,0), scale = 1, npoints = 100)
+{
+    ## Basically taken from the 'car' package: The Cirlce
+    theta <- (0:npoints) * 2 * pi/npoints
+    Circle <- cbind(cos(theta), sin(theta))
+    ## scale, center and cov must be calculated separately
+    t(center + scale * t(Circle %*% chol(cov)))
+}

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2010-06-16 13:34:45 UTC (rev 1234)
+++ pkg/vegan/inst/ChangeLog	2010-07-19 06:21:18 UTC (rev 1235)
@@ -5,6 +5,8 @@
 Version 1.18-7 (opened June 16, 2010)
 
 	* new version opened with the release of vegan_1.17-3.
+
+	* veganCovEllipse: new internal for drawing covariance ellipses.
 	
 Version 1.18-6 (closed June 16, 2010)
 



More information about the Vegan-commits mailing list