[Eventstudies-commits] r25 - in pkg: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Oct 18 09:33:05 CEST 2011
Author: vimsaa
Date: 2011-10-18 09:33:03 +0200 (Tue, 18 Oct 2011)
New Revision: 25
Added:
pkg/WISHLIST
Modified:
pkg/R/eventstudy.R
Log:
Adding a new file named WISHLIST. Vikram and I will be populating it very soon.
Modified: pkg/R/eventstudy.R
===================================================================
--- pkg/R/eventstudy.R 2011-09-21 09:11:55 UTC (rev 24)
+++ pkg/R/eventstudy.R 2011-10-18 07:33:03 UTC (rev 25)
@@ -14,12 +14,9 @@
# success : all is well.
# A vector of these outcomes is returned.
phys2eventtime <- function(z, events, width=10) {
-
# Just in case events$unit has been sent in as a factor --
events$unit <- as.character(events$unit)
if(is.factor(events$when)) stop("Sorry you provided a factor as an index")
-
-
# Given a zoo time-series vector x, and an event date "when",
# try to shift this vector into event time, where the event date
# becomes 0 and all other dates shift correspondingly.
@@ -50,7 +47,6 @@
outcomes <- outcomes
z.e <- z.e[,-1, drop = FALSE] #get rid of that junk initialisation
colnames(z.e) <- which(outcomes=="success")
-
## Now worry about whether there's information within the event window
## (This entire cleaning+checking can be switched off by specifying width=0)
badcolumns <- NULL
@@ -71,10 +67,8 @@
z.e <- z.e[, -badcolumns]
}
}
-
# Check that we're okay
stopifnot(sum(outcomes=="success") == NCOL(z.e))
-
list(z.e=z.e, outcomes=factor(outcomes))
}
Added: pkg/WISHLIST
===================================================================
--- pkg/WISHLIST (rev 0)
+++ pkg/WISHLIST 2011-10-18 07:33:03 UTC (rev 25)
@@ -0,0 +1,9 @@
+These are the functions one hopes to write at some point in time.
+
+1.
+2.
+3.
+4.
+5.
+6.
+7.
\ No newline at end of file
More information about the Eventstudies-commits
mailing list