Running ‘test-all.R’ [3s/6s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library(testthat)
  > library(eventstudies)
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: xts
  > test_package("eventstudies")
  
  Testing for class of arguments inputi: 1 
  i: 2 
  i: 3 
  
  Testing for class of arguments input── 1. Error: functionality for inference functions (@test_functionality_inferenc
  cannot open file 'Rplots.pdf'
  1: inference.bootstrap(es.w = test.eventtime0, to.plot = TRUE) at /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/eventstudies/tests/test_functionality_inference.R:47
  2: plot.inference(result, xlab = "Event time", ylab = ylab, main = "", col = "blue")
  3: plot.simple(inference[, 2], ylim = hilo1, ...)
  4: plot.default((-width + 1):width, x, type = "l", lwd = 2, ...)
  5: dev.hold()
  6: (function (file = if (onefile) "Rplots.pdf" else "Rplot%03d.pdf", width, height, 
         onefile, family, title, fonts, version, paper, encoding, bg, fg, pointsize, pagecentre, 
         colormodel, useDingbats, useKerning, fillOddEven, compress) 
     {
         initPSandPDFfonts()
         new <- list()
         if (!missing(width)) 
             new$width <- width
         if (!missing(height)) 
             new$height <- height
         if (!missing(onefile)) 
             new$onefile <- onefile
         if (!missing(title)) 
             new$title <- title
         if (!missing(fonts)) 
             new$fonts <- fonts
         if (!missing(version)) 
             new$version <- version
         if (!missing(paper)) 
             new$paper <- paper
         if (!missing(encoding)) 
             new$encoding <- encoding
         if (!missing(bg)) 
             new$bg <- bg
         if (!missing(fg)) 
             new$fg <- fg
         if (!missing(pointsize)) 
             new$pointsize <- pointsize
         if (!missing(pagecentre)) 
             new$pagecentre <- pagecentre
         if (!missing(colormodel)) 
             new$colormodel <- colormodel
         if (!missing(useDingbats)) 
             new$useDingbats <- useDingbats
         if (!missing(useKerning)) 
             new$useKerning <- useKerning
         if (!missing(fillOddEven)) 
             new$fillOddEven <- fillOddEven
         if (!missing(compress)) 
             new$compress <- compress
         old <- check.options(new, name.opt = ".PDF.Options", envir = .PSenv)
         if (!missing(family) && (inherits(family, "Type1Font") || inherits(family, "CIDFont"))) {
             enc <- family$encoding
             if (inherits(family, "Type1Font") && !is.null(enc) && enc != "default" && 
                 (is.null(old$encoding) || old$encoding == "default")) 
                 old$encoding <- enc
             family <- family$metrics
         }
         if (is.null(old$encoding) || old$encoding == "default") 
             old$encoding <- guessEncoding()
         if (!missing(family)) {
             if (length(family) == 4L) {
                 family <- c(family, "Symbol.afm")
             }
             else if (length(family) == 5L) {
             }
             else if (length(family) == 1L) {
                 pf <- pdfFonts(family)[[1L]]
                 if (is.null(pf)) 
                     stop(gettextf("unknown family '%s'", family), domain = NA)
                 matchFont(pf, old$encoding)
             }
             else stop("invalid 'family' argument")
             old$family <- family
         }
         version <- old$version
         versions <- c("1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "2.0")
         if (version %in% versions) 
             version <- as.integer(strsplit(version, "[.]")[[1L]])
         else stop("invalid PDF version")
         onefile <- old$onefile
         if (!checkIntFormat(file)) 
             stop(gettextf("invalid 'file' argument '%s'", file), domain = NA)
         .External(C_PDF, file, old$paper, old$family, old$encoding, old$bg, old$fg, old$width, 
             old$height, old$pointsize, onefile, old$pagecentre, old$title, old$fonts, 
             version[1L], version[2L], old$colormodel, old$useDingbats, old$useKerning, 
             old$fillOddEven, old$compress)
         invisible()
     })()
  
  
  Testing for class of arguments input
  Testing for missing dates in eventslist
  Testing for missing firm names in eventlist
  Testing for list component: outcomes
  Testing for list component: z.e
  Testing for no NA values in defined width
  Testing for only one firm data in events list
  Testing for intra-day functionality
  Testing for announcement post trading day
  Testing for normal input values
  Testing for wrong class of returns object
  Testing for event window less than 1
  Testing for value of is.levels with input in returns format
  Testing for type != None and no model arguments specified
   Testing for no. of rows in firm returns and market returns
  Testing for normal input values
  Testing for univariate series in zoo object
  Testing for normal input values
  Testing for normal input values
  Testing for univariate zoo object
  Testing for univariate series in remap.cumsum
  Testing for univariate series in remap.cumprod
  Testing for percentage and absolute returns in remap.cumsum
  Testing for percentage and absolute returns in remap.cumprod══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 19 SKIPPED: 2 FAILED: 1
  1. Error: functionality for inference functions (@test_functionality_inference.R#47) 
  
  Error: testthat unit tests failed
  In addition: Warning message:
  Placing tests in `inst/tests` is deprecated. Please use `tests/testthat` instead 
  Execution halted