2
url <- "http://www-personal.umich.edu/~mejn/netdata/hep-th.zip"
4
dest <- paste(sep="", tmp, "/", "hep-th.zip")
6
download.file(url, dest)
7
system(paste("cd ", tmp, "; unzip hep-th.zip"))
9
txt <- readLines(paste(sep="", tmp, "/hep-th.txt"))
10
gml <- paste(sep="", tmp, "/hep-th.gml")
13
g <- read.graph(gml, format="gml")
15
g <- remove.vertex.attribute(g, "id")
17
V(g)$name <- V(g)$label
18
g <- remove.vertex.attribute(g, "label")
20
E(g)$weight <- E(g)$value
21
g <- remove.edge.attribute(g, "value")
23
g$name <- "High energy physics collaborations"
24
g$Author <- "Mark E. J. Newman"
25
g$Citation <- "M. E. J. Newman, The structure of scientific collaboration networks, Proc. Natl. Acad. Sci. USA 98, 404-409 (2001)."
26
g$URL <- "http://www-personal.umich.edu/~mejn/netdata/"
27
g$Description <- paste(paste(collapse="\n", txt), sep="", "\n")
30
save(hepcollab, file="/tmp/hepcollab.Rdata")