Skip to content

Commit

Permalink
Fixed package dependencies and import issues.
Browse files Browse the repository at this point in the history
xts and zoo are still in Depends because xts 0.9-7 doesn't import zoo functions.
  • Loading branch information
chiraganand committed Jun 28, 2017
1 parent 795ffdf commit da81ca1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: eventstudies
Version: 1.2
Date: 2015-04-09
Date: 2017-06-28
Type: Package
Title: Event Study Analysis
Authors@R: c(
Expand All @@ -18,11 +18,12 @@ Authors@R: c(
email = "[email protected]")
)
Maintainer: Chirag Anand <[email protected]>
Depends: R (>= 3.0), zoo, xts, boot, testthat, sandwich
Depends: R (>= 3.4), zoo, xts
Description: An R package for conducting event studies and a platform
for methodological research on event studies.
VignetteBuilder: knitr
Suggests: knitr
Imports: boot, graphics, methods, testthat, sandwich, stats, utils
License: GPL-2
URL: https://github.com/nipfpmf/eventstudies
BugReports: https://github.com/nipfpmf/eventstudies/issues/new
Expand Down
8 changes: 7 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ S3method(plot, amm)
S3method(plot, es)
S3method(plot, ees)

import(boot, sandwich, testthat, xts, zoo)
importFrom("graphics", "abline", "legend", "lines", "par", "plot",
"plot.default", "points")
importFrom("methods", "formalArgs")
importFrom("utils", "capture.output", "head", "tail")
importFrom("boot", "boot", "boot.ci")

import(sandwich, stats, testthat, xts, zoo)
4 changes: 2 additions & 2 deletions R/eesInference.R
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,11 @@ yearly.exevent.summary <- function(tmp){
# Bad days
tmp.bad.y <- apply.yearly(xts(tmp.bad),function(x)nrow(x))
tmp.bad.y <- merge(tmp.bad.y,apply.yearly(xts(tmp.bad[,1]),function(x)median(x,na.rm=T)))
index(tmp.bad.y) <- as.yearmon(as.Date(substr(index(tmp.bad.y),1,4),"%Y"))
index(tmp.bad.y) <- zoo::as.yearmon(as.Date(substr(index(tmp.bad.y),1,4),"%Y"))
# Good days
tmp.good.y <- apply.yearly(xts(tmp.good),function(x)nrow(x))
tmp.good.y <- merge(tmp.good.y,apply.yearly(xts(tmp.good[,1]),function(x)median(x,na.rm=T)))
index(tmp.good.y) <- as.yearmon(as.Date(substr(index(tmp.good.y),1,4),"%Y"))
index(tmp.good.y) <- zoo::as.yearmon(as.Date(substr(index(tmp.good.y),1,4),"%Y"))
tmp.res <- merge(tmp.bad.y,tmp.good.y)
colnames(tmp.res) <- c("total.events.l","median.value.l",
"total.events.u","median.value.u")
Expand Down
2 changes: 1 addition & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ bibentry(bibtype = "Manual",
person("Ajay", "Shah")),
organisation = "NIPFP, Macro/Finance group",
year = 2014,
url = "http://CRAN.R-project.org/package=eventstudies")
url = "https://CRAN.R-project.org/package=eventstudies")

0 comments on commit da81ca1

Please sign in to comment.