Running 'test_analysis.R' [6s/6s]
Running the tests in 'tests/test_analysis.R' failed.
Complete output:
  > require(pheno2geno)
  Loading required package: pheno2geno
  Loading required package: qtl
  Loading required package: VGAM
  Loading required package: stats4
  Loading required package: splines
  Loading required package: mixtools
  mixtools package, version 1.1.0, Released 2017-03-10
  This package is based upon work supported by the National Science Foundation under Grant No. SES-0518772.
  
  > #setwd("C:/Users/Konrad/Documents/Github/phenotypes2genotypes/tests")
  > children  <- read.csv(file="offspring_phenotypes.csv",header=TRUE,row.names=1)
  > parents   <- read.csv(file="parental_phenotypes.csv",header=TRUE,row.names=1)
  > genotypes <- read.csv(file="genotypes.csv",header=TRUE,row.names=1)
  > map       <- read.csv(file="map.csv",header=TRUE,row.names=1)
  > 
  > #with parental data
  > population <- create.population(children,parents,c(0,0,0,0,0,0,1,1,1,1,1,1),genotypes,mapsPhysical=map,verbose=TRUE)
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  pheno2geno
   --- call from context --- 
  add.to.populationSub.internal(population, populationType, offspringPhenotypes, 
      "offspring$phenotypes", verbose, debugMode)
   --- call from argument --- 
  if (class(dataObject) != "matrix") stop("dataObject should be either a matrix or a date frame")
   --- R stacktrace ---
  where 1: add.to.populationSub.internal(population, populationType, offspringPhenotypes, 
      "offspring$phenotypes", verbose, debugMode)
  where 2: create.population(children, parents, c(0, 0, 0, 0, 0, 0, 1, 1, 
      1, 1, 1, 1), genotypes, mapsPhysical = map, verbose = TRUE)
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (population, populationType = c("riself", "f2", "bc", 
      "risib"), dataObject, dataType = c("founders", "offspring$phenotypes", 
      "founders$groups", "offspring$genotypes", "maps$genetic", 
      "maps$physical", "annotations"), verbose = FALSE, debugMode = 0) 
  {
      dataType <- match.arg(dataType)
      populationType <- match.arg(populationType)
      if (missing(dataObject)) 
          stop("dataObject is missing\n")
      if (dataType != "founders$groups") {
          if (class(dataObject) == "data.frame") 
              dataObject <- as.matrix(dataObject)
          if (class(dataObject) != "matrix") 
              stop("dataObject should be either a matrix or a date frame")
      }
      if (dataType == "founders" || dataType == "offspring$phenotypes") {
          population <- add.to.populationSubPheno.internal(population, 
              dataObject, dataType, verbose, debugMode)
      }
      else if (dataType == "offspring$genotypes") {
          if (!(is.null(dataObject)) && !is.null(dim(dataObject))) {
              population$offspring$genotypes$real <- add.to.populationSubGeno.internal(population, 
                  dataObject, populationType, verbose)
          }
          else {
              stop("No data provided for offspring$genotypes !\n")
          }
      }
      else if (dataType == "maps$genetic" || dataType == "maps$physical") {
          population <- add.to.populationSubMap.internal(population, 
              dataObject, dataType, verbose, debugMode)
      }
      else if (dataType == "founders$groups") {
          population$founders$groups <- dataObject
      }
      else {
          population <- add.to.populationSubAnnots.internal(population, 
              dataObject, verbose, debugMode)
      }
      invisible(population)
  }
  <bytecode: 0xcf41c80>
  <environment: namespace:pheno2geno>
   --- function search by body ---
  Function add.to.populationSub.internal in namespace pheno2geno has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Error in if (class(dataObject) != "matrix") stop("dataObject should be either a matrix or a date frame") : 
    the condition has length > 1
  Calls: create.population -> add.to.populationSub.internal
  Execution halted