inst/tests/test-read_popgraph.R

context("read.popgraph.R")

test_that("testing", {

  file <- system.file("extdata","lopho.pgraph",package="popgraph")
  if( file == "")
    file <- "/Users/rodney/Documents/Dropbox/R/popgraph/popgraph/inst/extdata/lopho.pgraph"
  
  graph <- read.popgraph( file )
  
  
  expect_that( graph, is_a("igraph") )
  expect_that( length( V(graph) ), equals(21) )
  expect_that( length( E(graph) ), equals(50) )
  expect_that( is.weighted(graph), is_true() )
  
}
)

Try the popgraph package in your browser

Any scripts or data that you put into this service are public.

popgraph documentation built on April 14, 2017, 9:58 p.m.