Running 'build.matches.test.R' [1s/1s]
  Running 'classes.test.R' [1s/1s]
  Running 'df.category.mean.test.R' [1s/1s]
  Running 'map.market.test.R' [1s/1s]
  Running 'matchit.test.R' [1s/1s]
  Running 'nearest.multiple.test.R' [1s/1s]
  Running 'next.treatment.test.R' [1s/1s]
  Running 'portfolio.Arith.test.R' [1s/1s]
  Running 'portfolio.all.equal.test.R' [1s/1s]
  Running 'portfolio.calcShares.test.R' [1s/1s]
  Running 'portfolio.calcWeights.test.R' [1s/1s]
  Running 'portfolio.create.test.R' [1s/1s]
  Running 'portfolio.expandData.test.R' [1s/1s]
  Running 'portfolio.expose.test.R' [1s/2s]
  Running 'portfolio.matching.test.R' [1s/1s]
  Running 'portfolio.mvLong.test.R' [1s/1s]
  Running 'portfolio.mvShort.test.R' [1s/1s]
  Running 'portfolio.performance.test.R' [1s/1s]
  Running 'portfolio.updatePrices.test.R' [1s/1s]
  Running 'portfolioBasic.Arith.test.R' [1s/1s]
  Running 'portfolioBasic.all.equal.test.R' [1s/1s]
  Running 'portfolioBasic.contribution.test.R' [1s/1s]
  Running 'portfolioBasic.exposure.test.R' [1s/1s]
  Running 'portfolioBasic.performance.test.R' [1s/1s]
  Running 'portfolioBasic.test.R' [1s/1s]
  Running 'prob.matrix.test.R' [1s/1s]
  Running 'sample.matrix.test.R' [1s/1s]
  Running 'tradelist.calcActual.test.R' [1s/1s]
  Running 'tradelist.calcCandidates.test.R' [1s/1s]
  Running 'tradelist.calcChunks.test.R' [1s/1s]
  Running 'tradelist.calcChunksActual.test.R' [1s/1s]
  Running 'tradelist.calcRanks.test.R' [1s/1s]
  Running 'tradelist.calcSwaps.test.R' [1s/1s]
  Running 'tradelist.calcSwapsActual.test.R' [1s/1s]
  Running 'trades.test.R' [1s/1s]
  Running 'weight.test.R' [1s/1s]
Running the tests in 'tests/portfolioBasic.exposure.test.R' failed.
Complete output:
  > ################################################################################
  > ##
  > ## $Id: portfolioBasic.exposure.test.R 346 2006-10-01 05:08:55Z enos $
  > ##
  > ## Tests for the portfolioBasic class.
  > ##
  > ################################################################################
  > 
  > library(portfolio)
  Loading required package: grid
  Loading required package: lattice
  Loading required package: nlme
  > 
  > load("portfolioBasic.exposure.test.RData")
  > 
  > ## save(data, exp.1, x, file = "portfolioBasic.exposure.test.RData", compress = TRUE)
  > 
  > ## data <- data.frame(id = 1:20, in.var = 1:20)
  > ## data$in.var <- as.numeric(data$in.var)
  > 
  > ## ## Construct by.var's.  Note that the assigned vectors are
  > ## ## deliberately recycled.
  > 
  > ## data$by.var.1 <- c("1","2")
  > ## data$by.var.2 <- c("1","2","3","4")
  > ## data$by.var.3 <- c(-1,0,0,1)
  > 
  > ## x <- new("portfolioBasic", in.var = "in.var", type = "sigmoid", size = 8, data = data)
  > ## x <- create(x)
  > 
  > exp.1.test <- exposure(x, exp.var = c("by.var.1","by.var.2","by.var.3"))
  > 
  > ## Function to test equality of data frame components of the exposure
  > ## object's data slot.  Different default handling of row.names in
  > ## 2.4.0 makes it necessary to compare column-by-column.
  > 
  > exp.df.equal <- function(e1, e2) {
  +   return(all.equal(e1$variable, e2$variable) &&
  +          all.equal(e1$long,     e2$long) &&
  +          all.equal(e1$short,    e2$short) &&
  +          all.equal(e1$exposure, e2$exposure))
  + }
  > 
  > stopifnot(all.equal(names(exp.1@data), names(exp.1.test@data)),
  +           exp.df.equal(exp.1@data$numeric,  exp.1.test@data$numeric),
  +           exp.df.equal(exp.1@data$by.var.1, exp.1.test@data$by.var.1),
  +           exp.df.equal(exp.1@data$by.var.2, exp.1.test@data$by.var.2))
  Error in all.equal(e1$variable, e2$variable) && all.equal(e1$long, e2$long) : 
    invalid 'x' type in 'x && y'
  Calls: stopifnot -> exp.df.equal
  Execution halted
Running the tests in 'tests/tradelist.calcCandidates.test.R' failed.
Complete output:
  > ################################################################################
  > ##
  > ## $Id: tradelist.calcCandidates.test.R 346 2006-10-01 05:08:55Z enos $
  > ##
  > ## Tests calcCandidates method of "tradelist" class
  > ##
  > ################################################################################
  > 
  > library(portfolio)
  Loading required package: grid
  Loading required package: lattice
  Loading required package: nlme
  > 
  > load("tradelist.calcCandidates.test.RData")
  > 
  > ## save(data, p.orig, p.target, truth.candidates, truth.restricted, truth.2, truth.3, file = "tradelist.calcCandidates.test.RData", compress = TRUE)
  > 
  > ## Creates base objects for use in the remainder of the test
  > 
  > tl.base <- new("tradelist", turnover = 64000, data = data)
  > 
  > ## Simulates actual use of the tradelist class by using 2 non-empty
  > ## portfolio.  Tests the overall functionality of the method.
  > 
  > tl.1 <- portfolio:::calcCandidates(tl.base, p.orig, p.target)
  > 
  > stopifnot(all.equal(tl.1@candidates, truth.candidates))
  > stopifnot(all.equal(tl.1@restricted, truth.restricted))
  Error: tl.1@restricted and truth.restricted are not equal:
    Component "reason": Modes: character, numeric
    Component "reason": Attributes: < target is NULL, current is list >
    Component "reason": target is character, current is factor
  Execution halted