[Returnanalytics-commits] r2300 - pkg/PerformanceAnalytics/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 27 19:03:10 CET 2012


Author: braverock
Date: 2012-11-27 19:03:09 +0100 (Tue, 27 Nov 2012)
New Revision: 2300

Modified:
   pkg/PerformanceAnalytics/R/StdDev.annualized.R
Log:
- use sd.xts again to avoid BDR's gratuitous apply() warning

Modified: pkg/PerformanceAnalytics/R/StdDev.annualized.R
===================================================================
--- pkg/PerformanceAnalytics/R/StdDev.annualized.R	2012-11-12 20:57:15 UTC (rev 2299)
+++ pkg/PerformanceAnalytics/R/StdDev.annualized.R	2012-11-27 18:03:09 UTC (rev 2300)
@@ -66,7 +66,7 @@
                 yearly = {scale = 1}
             )
         }
-        sqrt(scale)*sd(x, na.rm=TRUE)
+        sqrt(scale)*xts:::sd.xts(x, na.rm=TRUE)
     } else { 
         result = apply(x, 2, sd.multiperiod, scale=scale)
         dim(result) = c(1,NCOL(x))



More information about the Returnanalytics-commits mailing list