[Eventstudies-commits] r379 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Oct 26 15:46:31 CET 2014


Author: chiraganand
Date: 2014-10-26 15:46:31 +0100 (Sun, 26 Oct 2014)
New Revision: 379

Modified:
   pkg/R/phys2eventtime.R
Log:
Return NULL if there are no columns left after checking for NAs inside the width.

Modified: pkg/R/phys2eventtime.R
===================================================================
--- pkg/R/phys2eventtime.R	2014-10-18 13:14:32 UTC (rev 378)
+++ pkg/R/phys2eventtime.R	2014-10-26 14:46:31 UTC (rev 379)
@@ -53,6 +53,10 @@
     }
   }
 
+  if (NCOL(z.e) == 0) {
+    return(list(z.e = NULL, outcomes = factor(outcomes)))
+  }
+
   ## Double check
   stopifnot(sum(outcomes=="success") == NCOL(z.e))
   list(z.e=z.e, outcomes=factor(outcomes), events = events.attrib) # :DOC: events.attrib



More information about the Eventstudies-commits mailing list