Running 'invariance.R' [34s/19s]
  Running 'lavaan.R' [44s/48s]
  Running 'tree.R' [64s/29s]
  Running 'vim.R' [199s/93s]
Running the tests in 'tests/vim.R' failed.
Complete output:
  > set.seed(789)
  > require("semtree")
  Loading required package: semtree
  Loading required package: OpenMx
  > data(lgcm)
  > 
  > lgcm$agegroup <- as.ordered(lgcm$agegroup)
  > lgcm$training <- as.factor(lgcm$training)
  > lgcm$noise <- as.numeric(lgcm$noise)
  > 
  > # LOAD IN OPENMX MODEL.
  > # A SIMPLE LINEAR GROWTH MODEL WITH 5 TIME POINTS FROM SIMULATED DATA
  > 
  > manifests <- names(lgcm)[1:5]
  > lgcModel <- mxModel("Linear Growth Curve Model Path Specification",
  +                             type="RAM",
  +                             manifestVars=manifests,
  +                             latentVars=c("intercept","slope"),
  +                             # residual variances
  +                             mxPath(
  +                               from=manifests,
  +                               arrows=2,
  +                               free=TRUE,
  +                               values = c(1, 1, 1, 1, 1),
  +                               labels=c("residual1","residual2","residual3","residual4","residual5")
  +                             ),
  +                             # latent variances and covariance
  +                             mxPath(
  +                               from=c("intercept","slope"),
  +                               connect="unique.pairs",
  +                               arrows=2,
  +                               free=TRUE,
  +                               values=c(1, 1, 1),
  +                               labels=c("vari", "cov", "vars")
  +                             ),
  +                             # intercept loadings
  +                             mxPath(
  +                               from="intercept",
  +                               to=manifests,
  +                               arrows=1,
  +                               free=FALSE,
  +                               values=c(1, 1, 1, 1, 1)
  +                             ),
  +                             # slope loadings
  +                             mxPath(
  +                               from="slope",
  +                               to=manifests,
  +                               arrows=1,
  +                               free=FALSE,
  +                               values=c(0, 1, 2, 3, 4)
  +                             ),
  +                             # manifest means
  +                             mxPath(
  +                               from="one",
  +                               to=manifests,
  +                               arrows=1,
  +                               free=FALSE,
  +                               values=c(0, 0, 0, 0, 0)
  +                             ),
  +                             # latent means
  +                             mxPath(
  +                               from="one",
  +                               to=c("intercept", "slope"),
  +                               arrows=1,
  +                               free=TRUE,
  +                               values=c(1, 1),
  +                               labels=c("meani", "means")
  +                             ),
  +                     mxData(lgcm,type="raw")
  +                     )
  > 
  > 
  > fr <- semforest(lgcModel, lgcm,control = semforest.control(num.trees = 25))
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  [x] Tree construction finished!
  > 
  >   
  > vimp <- varimp(fr)
  > 
  > print(vimp)
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  semtree
   --- call from context --- 
  print.semforest.varimp(vimp)
   --- call from argument --- 
  if (class(vimp$importance) == "matrix") {
      x <- aggregateVarimp(vimp, aggregate, scale, na.omit)
  } else {
      x <- vimp$importance
      if (!na.omit) {
          x[is.na(x)] <- 0
      }
  }
   --- R stacktrace ---
  where 1: print.semforest.varimp(vimp)
  where 2: print(vimp)
  where 3: print(vimp)
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (x, aggregate = "mean", scale = "absolute", sort.values = F, 
      na.omit = FALSE, ...) 
  {
      vimp <- x
      if (class(vimp$importance) == "matrix") {
          x <- aggregateVarimp(vimp, aggregate, scale, na.omit)
      }
      else {
          x <- vimp$importance
          if (!na.omit) {
              x[is.na(x)] <- 0
          }
      }
      if (sort.values) {
          low <- min(x, na.rm = T) - 1
          filt <- is.na(x)
          x[filt] <- low
          srt <- sort(x, index.return = T)
          x <- x[srt$ix]
          x[x <= (low + 0.5)] <- NA
      }
      cat("Variable Importance\n")
      print(x, ...)
  }
  <bytecode: 0xa09d870>
  <environment: namespace:semtree>
   --- function search by body ---
  Function print.semforest.varimp in namespace semtree has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Error in if (class(vimp$importance) == "matrix") { : 
    the condition has length > 1
  Calls: print -> print -> print.semforest.varimp
  Execution halted