# undirected graph
policeGraphUn = toaGraph("dallaspolice_officer_vertices", "dallaspolice_officer_edges_un",
directed = FALSE, key = "officer", source = "officer1", target = "officer2",
vertexAttrnames = c("offense_count"), edgeAttrnames = c("weight"))
# directed graph with the vertex filter
policeGraphDi = toaGraph("dallaspolice_officer_vertices", "dallaspolice_officer_edges_di",
directed = TRUE, key = "officer", source = "officer1", target = "officer2",
vertexAttrnames = c("offense_count"), edgeAttrnames = c("weight"),
vertexWhere = "officer ~ '[A-Z].*'")
Run the code above in your browser using DataLab