# Create a structure vector with duplicates
core1 <- o_glycan_core_1()
core2 <- n_glycan_core()
structures <- c(core1, core2, core1) # core1 appears twice
# Test if some structures have more than 5 vertices
ssome(structures, function(g) igraph::vcount(g) > 5)
# Test if all structures have at least 3 vertices
severy(structures, function(g) igraph::vcount(g) >= 3)
# Test if no structures have more than 20 vertices
snone(structures, function(g) igraph::vcount(g) > 20)
# Use purrr-style lambda functions
ssome(structures, ~ igraph::vcount(.x) > 5)
severy(structures, ~ igraph::vcount(.x) >= 3)
snone(structures, ~ igraph::vcount(.x) > 20)
Run the code above in your browser using DataLab