Description Usage Arguments Examples
Compute various statistic distributions on graph edges and vertices.
1 2 3 4 |
channel |
connection object as returned by |
graph |
an object of class |
type |
choose between graph measures to compute histogram distribution for:
|
weight |
logical or character: if logical then |
binMethod |
one of several methods to determine number and size of bins: |
numbins |
number of bins to use in histogram. |
binsize |
size (width) of discrete intervals defining histogram (all bins are equal). |
startvalue |
lower end (bound) of values to include in histogram. |
endvalue |
upper end (bound) of values to include in histogram. |
vertexWhere |
SQL WHERE clause limiting data from the vertex table. This value when not null
overrides corresponding value |
edgeWhere |
SQL WHERE clause limiting data from the edge table. This value when not null
overrides corresponding value |
allTables |
pre-built information about existing tables. |
test |
logical: if TRUE show what would be done, only (similar to parameter |
... |
other arguments passed on to Aster graph functions except for |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | if(interactive()) {
policeGraphUn = toaGraph("dallaspolice_officer_vertices", "dallaspolice_officer_edges_un",
directed = FALSE, key = "officer",
source = "officer1", target = "officer2",
vertexAttrnames = c("offense_count"), edgeAttrnames = c("weight"))
# initialize connection to Lahman baseball database in Aster
conn = odbcDriverConnect(connection="driver={Aster ODBC Driver};
server=<dbhost>;port=2406;database=<dbname>;uid=<user>;pwd=<pw>")
hdegreePolice = computeGraphHistogram(conn, policeGraphUn, type='degree', numbins=36)
createHistogram(hdegreePolice,
title = "Dallas Police Graph Degree Distribution",
xlab='Degree', ylab='Count')
hshortestpathPolice = computeGraphHistogram(conn, policeGraphUn, type='shortestpath',
numbins = 10)
createHistogram(hshortestpathPolice,
title = "Dallas Police Shortest Path Distribution",
xlab = "Distance", ylab = "Count")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.