[Vars-commits] r101 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 15 01:05:39 CEST 2013


Author: bpfaff
Date: 2013-08-15 01:05:38 +0200 (Thu, 15 Aug 2013)
New Revision: 101

Modified:
   pkg/R/internal.R
Log:
Fixed .irf for cumulative, one response and multiple impulses.


Modified: pkg/R/internal.R
===================================================================
--- pkg/R/internal.R	2013-08-14 22:57:09 UTC (rev 100)
+++ pkg/R/internal.R	2013-08-14 23:05:38 UTC (rev 101)
@@ -102,9 +102,9 @@
     if(cumulative){
       if(length(response) > 1) irs[[i]] <- apply(irs[[i]], 2, cumsum)
       if(length(response) == 1){
-        tmp <- matrix(cumsum(irs[[1]]))
+        tmp <- matrix(cumsum(irs[[i]]))
         colnames(tmp) <- response
-        irs[[1]] <- tmp
+        irs[[i]] <- tmp
       }
     }
   }



More information about the Vars-commits mailing list