Nothing
test_that("I can index a vs twice", {
edges <- data.frame(
stringsAsFactors = TRUE,
from = c("BOS", "JFK", "DEN", "BOS", "JFK", "DEN"),
to = c("JFK", "DEN", "ABQ", "JFK", "DEN", "ABQ"),
carrier = c("foo", "foo", "foo", "bar", "bar", "bar")
)
vertices <- data.frame(
stringsAsFactors = TRUE,
id = c("BOS", "JFK", "DEN", "ABQ"),
state = c("MA", "NY", "CO", "NM")
)
g <- graph_from_data_frame(edges, vertices = vertices)
x <- V(g)[3:4][state == "NM"]
expect_equal(ignore_attr = TRUE, x, V(g)["ABQ"])
})
test_that("I can index an es twice", {
edges <- data.frame(
stringsAsFactors = TRUE,
from = c("BOS", "JFK", "DEN", "BOS", "JFK", "DEN"),
to = c("JFK", "DEN", "ABQ", "JFK", "DEN", "ABQ"),
carrier = c("foo", "foo", "foo", "bar", "bar", "bar")
)
g <- graph_from_data_frame(edges)
x <- E(g)["BOS" %->% "JFK"][carrier == "foo"]
expect_equal(ignore_attr = TRUE, x, E(g)[carrier == "foo" & .from("BOS") & .to("JFK")])
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.