[Eventstudies-commits] r297 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Apr 30 06:40:10 CEST 2014
Author: chiraganand
Date: 2014-04-30 06:40:10 +0200 (Wed, 30 Apr 2014)
New Revision: 297
Modified:
pkg/R/eventstudy.R
Log:
Made print and summary functions same, summary is calling print, can be changed at a later time.
Modified: pkg/R/eventstudy.R
===================================================================
--- pkg/R/eventstudy.R 2014-04-30 04:29:44 UTC (rev 296)
+++ pkg/R/eventstudy.R 2014-04-30 04:40:10 UTC (rev 297)
@@ -144,19 +144,18 @@
#########################
## Functions for class es
#########################
+
print.es <- function(x, ...){
- cat("The", x$inference, "inference output for CI and",
- colnames(x$eventstudy.output)[2], "response:", "\n")
- print.default(x$eventstudy.output)
+ cat("Event study", colnames(x$eventstudy.output)[2], "response with",
+ x$inference, "inference for CI:\n")
+ print(x$eventstudy.output)
+ cat("\n","Event outcome has",length(which(x$outcomes=="success")),
+ "successful outcomes out of", length(x$outcomes),"events:","\n")
+ x$outcomes
}
summary.es <- function(object, ...){
- cat("Event study", colnames(object$eventstudy.output)[2], "response with",
- object$inference, "inference for CI:\n")
- print(object$eventstudy.output)
- cat("\n","Event outcome has",length(which(object$outcomes=="success")),
- "successful outcomes out of", length(object$outcomes),"events:","\n")
- object$outcomes
+ print.es(object, ...)
}
plot.es <- function(x, xlab = NULL, ylab = NULL, ...){
More information about the Eventstudies-commits
mailing list