/usr/lib/R/site-library/graph/unitTests/leaves_test.R is in r-bioc-graph 1.56.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library("graph")
data(apopGraph)
data(graphExamples)
test_leaves_undirected <- function() {
want <- "c"
checkEquals(want, leaves(graphExamples[[1]]))
}
test_leaves_directed_in <- function() {
want <- c("trkA", "CASP2", "CASP6", "DNA fragmentation",
"Nucleus", "CASP9", "TRF3", "CASP10")
checkTrue(setequal(want, leaves(apopGraph, degree.dir="out")))
}
test_leaves_directed_in <- function() {
want <- c("TNFa", "TNFb", "FasL", "CD40L", "FAP-1", "NGF",
"Daxx", "Bax", "CASP4", "Glucocorticoid", "Mtd", "Bad",
"CASP11", "Bcl-w")
checkTrue(setequal(want, leaves(apopGraph, degree.dir="in")))
}
|