Running 'rundemos.R' [2s/3s]
Running the tests in 'tests/rundemos.R' failed.
Complete output:
  > library(rgexf)
  Loading required package: XML
  Loading required package: Rook
  Loading required package: igraph
  
  Attaching package: 'igraph'
  
  The following objects are masked from 'package:stats':
  
      decompose, spectrum
  
  The following object is masked from 'package:base':
  
      union
  
  > 
  > demo(edge.list)
  
  
  	demo(edge.list)
  	---- ~~~~~~~~~
  
  > ################################################################################
  > # Demo of gexf function - Input: a list of edges  
  > # Author: Jorge Fabrega
  > ################################################################################
  > pause <- function() {  
  +   invisible(readline("\nPress <return> to continue: ")) 
  + }
  
  > pause()
  
  Press <return> to continue: 
  
  > ## Demos for rgexf - Nodes and edges with attributes.
  > ## Input: A matrix of edges 
  > 
  > # Defining a matrix of edges
  > relations <- matrix(c("Juan","Carlos",
  +                       "Juan","Pedro",
  +                       "Juan","Matthew",
  +                       "Pedro","Matthew",
  +                       "Matthew","Carlos",
  +                       "Carlos","Pedro",
  +                       "Pedro","Carlos",
  +                       "Carlos","Juan",
  +                       "Carlos","Juan"),
  +                     ncol=2, byrow=T)
  
  > relations
        [,1]      [,2]     
   [1,] "Juan"    "Carlos" 
   [2,] "Juan"    "Pedro"  
   [3,] "Juan"    "Matthew"
   [4,] "Pedro"   "Matthew"
   [5,] "Matthew" "Carlos" 
   [6,] "Carlos"  "Pedro"  
   [7,] "Pedro"   "Carlos" 
   [8,] "Carlos"  "Juan"   
   [9,] "Carlos"  "Juan"   
  
  > # Now, with processEdgeList you can transform your edge list into a gexf file
  > 
  > pause()
  
  Press <return> to continue: 
  
  > edge.list(relations)
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  rgexf
   --- call from context --- 
  edge.list(relations)
   --- call from argument --- 
  if (objClass %in% c("matrix", "data.frame")) {
      if (nCols) {
          if (!is.factor(x)) 
              x <- factor(c(x[, 1], x[, 2]))
          edges <- matrix(unclass(x), byrow = FALSE, ncol = 2)
          colnames(edges) <- c("source", "target")
          nodes <- data.frame(id = 1:nlevels(x), label = levels(x), 
              stringsAsFactors = F)
          edgelist <- list(nodes = nodes, edges = edges)
          return(edgelist)
      }
      else stop("Insuficcient number of columns (", nCols, ")")
  } else stop(objClass, " class not allowed, try with a \"matrix\" or a \"data.frame\"")
   --- R stacktrace ---
  where 1 at /home/hornik/tmp/R.check/r-devel-clang/Work/build/Packages/rgexf/demo/edge.list.R#30: edge.list(relations)
  where 2: eval(ei, envir)
  where 3: eval(ei, envir)
  where 4: withVisible(eval(ei, envir))
  where 5: source(available, echo = echo, max.deparse.length = Inf, keep.source = TRUE, 
      encoding = encoding)
  where 6: demo(edge.list)
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (x) 
  {
      objClass <- class(x)
      nEdges <- NROW(x)
      nCols <- NCOL(x) == 2
      if (objClass %in% c("matrix", "data.frame")) {
          if (nCols) {
              if (!is.factor(x)) 
                  x <- factor(c(x[, 1], x[, 2]))
              edges <- matrix(unclass(x), byrow = FALSE, ncol = 2)
              colnames(edges) <- c("source", "target")
              nodes <- data.frame(id = 1:nlevels(x), label = levels(x), 
                  stringsAsFactors = F)
              edgelist <- list(nodes = nodes, edges = edges)
              return(edgelist)
          }
          else stop("Insuficcient number of columns (", nCols, 
              ")")
      }
      else stop(objClass, " class not allowed, try with a \"matrix\" or a \"data.frame\"")
  }
  <bytecode: 0x426f728>
  <environment: namespace:rgexf>
   --- function search by body ---
  Function edge.list in namespace rgexf has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Error in if (objClass %in% c("matrix", "data.frame")) { : 
    the condition has length > 1
  Calls: demo -> source -> withVisible -> eval -> eval -> edge.list
  Execution halted