Running ‘as.edgelist_tests.R’ [0s/1s]
  Running ‘general.tests.R’ [0s/1s]
  Running ‘general.tests2.R’ [3s/5s]
  Running ‘list.attribute.tests.R’ [0s/1s]
  Running ‘misc_tests.R’ [0s/1s]
  Running ‘network.access.test.R’ [0s/1s]
  Running ‘network.battery.R’ [1s/1s]
  Running ‘pathological.tests.R’ [0s/1s]
  Running ‘plot_tests.R’ [1s/2s]
  Running ‘plotflo.R’ [1s/1s]
  Running ‘read.paj_tests.R’ [1s/130s]
  Running ‘speedTests.R’ [6s/8s]
  Running ‘vignette.R’ [1s/1s]
Running the tests in ‘tests/read.paj_tests.R’ failed.
Complete output:
  > # test for reading pajek formatted files
  > require(testthat)
  Loading required package: testthat
  > require(network)
  Loading required package: network
  network: Classes for Relational Data
  Version 1.15 created on 2019-04-01.
  copyright (c) 2005, Carter T. Butts, University of California-Irvine
                      Mark S. Handcock, University of California -- Los Angeles
                      David R. Hunter, Penn State University
                      Martina Morris, University of Washington
                      Skye Bender-deMoll, University of Washington
   For citation information, type citation("network").
   Type help("network-package") to get started.
  
  > 
  > 
  > # test for case of verticse, but no edges/arcs
  > tmptest<-tempfile()
  > cat("*Vertices          2
  +         1    1231062
  +         2    1231095
  + *Arcs
  + *Edges
  + ",file=tmptest)
  > noEdges<-read.paj(tmptest)
  > expect_equal(network.size(noEdges),2)
  > expect_equal(network.edgecount(noEdges),0)
  > 
  > 
  > # check arcs vs edges parsing
  > 
  > # arcs only
  > 
  > tmptest<-tempfile()
  > cat("*Vertices          3
  + 1   'A' 
  + 2   'B'
  + 3   'C' 
  + *Arcs
  + 1 2 1
  + 1 3 1
  + ",file=tmptest)
  > arcsOnly<-read.paj(tmptest)
  > expect_true(is.directed(arcsOnly))
  > expect_equal(network.edgecount(arcsOnly),2)
  > 
  > # edges only
  > tmptest<-tempfile()
  > cat('*Vertices      9
  + 1 "1"    0.3034    0.7561
  + 2 "2"    0.4565    0.6039
  + 3 "3"    0.4887    0.8188
  + 4 "4"    0.5687    0.4184
  + 5 "5"    0.3574    0.4180
  + 6 "6"    0.7347    0.2678
  + 7 "7"    0.9589    0.3105
  + 8 "8"    0.8833    0.1269
  + 9 "9"    0.7034    0.0411
  + *Arcs
  + *Edges
  + 1      2       1
  + 1      3       1
  + 2      3       1
  + 2      4       1
  + 2      5       1
  + 4      5       1
  + 4      6       1
  + 6      7       1
  + 6      8       1
  + 6      9       1
  + 7      8       1
  + 8      9       1 
  + ',file=tmptest)
  > edgesOnly<-read.paj(tmptest)
  > expect_false(is.directed(edgesOnly))
  > expect_equal(network.edgecount(edgesOnly),12)
  > 
  > 
  > # both arcs and edges
  > # network will be directed, each *edges record will create one arc in each direction
  > tmptest<-tempfile()
  > cat("*Vertices          4
  + 1   'A' 
  + 2   'B' 
  + 3   'C'
  + 4   'D'
  + *Arcs
  + 1 2 1
  + 1 3 1
  + *Edges
  + 3 4 1
  + ",file=tmptest)
  > arcsNEdges<-read.paj(tmptest)
  > expect_true(is.directed(arcsNEdges))
  > expect_equal(network.edgecount(arcsNEdges),4)
  > as.matrix(arcsNEdges)
    A B C D
  A 0 1 1 0
  B 0 0 0 0
  C 0 0 0 1
  D 0 0 1 0
  > 
  > 
  > # ----- error testing
  > tmptest<-tempfile()
  > cat("*Vertices          2
  + 1   'A' 
  + 2   'B' 
  + *Arcs
  + 1 
  + ",file=tmptest)
  > expect_error(read.paj(tmptest),regexp = 'does not appear to have the required')
  > 
  > tmptest<-tempfile()
  > cat("*Vertices          2
  + 1   'A' 
  + 2   'B' 
  + *Arcs
  + 1 A 1
  + ",file=tmptest)
  > expect_error(read.paj(tmptest),regexp = 'contains non-numeric or NA values')
  Warning message:
  In read.paj(tmptest) : NAs introduced by coercion
  > 
  > tmptest<-tempfile()
  > cat("*Vertices          2
  + 1   'A' 
  + 2   'B' 
  + *Arcs
  + 1 2.5 1
  + ",file=tmptest)
  > expect_error(read.paj(tmptest),regexp = 'contains non-integer values')
  > 
  > 
  > # check vertex graphic attribute fill-in
  > tmptest<-tempfile()
  > cat("*Vertices          4
  + 1   'A' 0 0 0 box
  + 2   'B' 0 0 0
  + 3   'C' 0 0 0 
  + 4   'D' 0 0 0 ellipse
  + *Arcs
  + 1 2 1
  + 1 3 1
  + ",file=tmptest)
  > fillIn<-read.paj(tmptest)
  > expect_equal(fillIn%v%'shape',c('box','box','box','ellipse'))
  > 
  > 
  > # test stuff in file comments
  > ########## but multirelational ############ only ~200  nodes 
  > #GulfLDays.net 
  > #GulfLMonths.net
  > #GulfLDow.net 
  > #gulfAllDays.net     #GulfADays.zip
  > #gulfAllMonths.net   #GulfAMonths.zip
  > #LevantDays.net 
  > #LevantMonths.net
  > #BalkanDays.net 
  > #BalkanMonths.net 
  > 
  > #arcs and edges both present   search for " #these have both arc and edge lines " or "URL has a net file"
  > #Graph drawing competition page (GD)
  > #C95,C95,B98,A99,C99,A99m
  > 
  > 
  > #things to do:
  > #handle ragged array .net files like "CSphd.net"     DONE!!
  > #handel two mode networks                            DONE!!
  > #handle mix of edges and arcs                        DONE!!
  > #handle multirelational pajek files
  > 
  > #issue with read.table and number.cols and fill...SanJuanSur_deathmessage.net has one row with 8 all the rest (including the first 5 have 5)
  > 
  > 
  > 
  > # this file has character encoding issues
  > scotland<-tempfile('scotland',fileext='.zip')
  > download.file('http://vlado.fmf.uni-lj.si/pub/networks/data/esna/scotland.zip',scotland)
  trying URL 'http://vlado.fmf.uni-lj.si/pub/networks/data/esna/scotland.zip'
  Error in download.file("http://vlado.fmf.uni-lj.si/pub/networks/data/esna/scotland.zip",  : 
    cannot open URL 'http://vlado.fmf.uni-lj.si/pub/networks/data/esna/scotland.zip'
  In addition: Warning message:
  In download.file("http://vlado.fmf.uni-lj.si/pub/networks/data/esna/scotland.zip",  :
    URL 'http://vlado.fmf.uni-lj.si/pub/networks/data/esna/scotland.zip': status was 'Couldn't connect to server'
  Execution halted