inst/unitTests/test_nodeWeights.R

test_nodeWeights <- function()
{
  V <- LETTERS[1:4]
  g <- graphNEL(nodes = V, edgemode = "directed")
  
  checkEquals(length(nodeWeights(g)), length(nodes(g)))
  checkEquals(nodeWeights(g, "B"), 1, checkNames=FALSE)
  checkEquals(nodeWeights(g, "A", attr = "WT", default = 3), 3, checkNames=FALSE)
}

Try the ROntoTools package in your browser

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

ROntoTools documentation built on Nov. 8, 2020, 7:41 p.m.