nexus.list(tags=NULL, offset=0, limit=10,
operator=c("or", "and"),
order=c("date", "name", "popularity"),
nexus.url=getIgraphOpt("nexus.url"))
nexus.info(id, nexus.url=getIgraphOpt("nexus.url"))
nexus.get(id, offset=0, order=c("date", "name", "popularity"),
nexus.url=getIgraphOpt("nexus.url"))
nexus.search(q, offset=0, limit=10,
order=c("date", "name", "popularity"),
nexus.url=getIgraphOpt("nexus.url"))## S3 method for class 'nexusDatasetInfo':
print(x, \dots)
## S3 method for class 'nexusDatasetInfoList':
summary(object, \dots)
## S3 method for class 'nexusDatasetInfoList':
print(x, \dots)
NULL
), then all datasets are listed.offset
+1.nexusDatasetInfo
or nexusDatasetInfoList
object
here directly and then the query is done on thenexusDatasetInfo
object to print.nexus.list
and nexus.search
return a list of
nexusDatasetInfo
objects. The list also has these attributes:
[object Object],[object Object],[object Object],[object Object]
nexus.info
returns a single nexusDatasetInfo
object. nexus.get
returns an igraph graph object, or a list of graph
objects, if the data set consists of multiple networks.
The nexus.list
and nexus.info
functions query the
online database. They both return nexusDatasetInfo
objects.
nexus.info
returns more information than nexus.list
.
nexus.search
searches Nexus, and returns a list of data sets,
as nexusDatasetInfo
objects. See below for some search
examples.
nexus.get
downloads a data set from Nexus, based on its numeric
id, or based on a Nexus search string. For search strings, only the
first search hit is downloaded, but see also the offset
argument. (If there are not data sets found, then the function returns
an error.)
The nexusDatasetInfo
objects returned by nexus.list
have
the following fields:
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
nexusDatasetInfo
objects returned by nexus.info
have the
following additional fields:
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The results of the Nexus queries are printed to the screen in a
consise format, similar to the format of igraph graphs. A data set
list (typically the result of nexus.list
and
nexus.search
) looks like this: NEXUS 1-5/18 -- data set list
[1] kaptail.4 39/109-223 #18 Kapferer tailor shop
[2] condmatcollab2003 31163/120029 #17 Condensed matter collaborations+
[3] condmatcollab 16726/47594 #16 Condensed matter collaborations+
[4] powergrid 4941/6594 #15 Western US power grid
[5] celegansneural 297/2359 #14 C. Elegans neural network
Each line here represents a data set, and the following information is
given about them: the character id of the data set
(e.g. kaptail
or powergrid
), the number of vertices and
number of edges in the graph of the data sets. For data sets with
multiple graphs, intervals are given here. Then the numeric id of the
data set and the reamining space is filled with the name of the data
set.
Summary information about an individual Nexus data set is printed
as NEXUS B--- 39 109-223 #18 kaptail -- Kapferer tailor shop
+ tags: directed; social network; undirected
+ nets: 1/KAPFTI2; 2/KAPFTS2; 3/KAPFTI1; 4/KAPFTS1
This is very similar to the header that is used for printing igraph
graphs, but there are some differences as well. The four characters
after the NEXUS
word give the most important properties of the
graph(s): the first is U
D
B
N
W
B
Detailed data set information is printed similarly, but it contains more fields.
nexus.list(tag="weighted")
nexus.list(limit=3, order="name")
nexus.list(limit=3, order="name")[[1]]
nexus.info(2)
g <- nexus.get(2)
summary(g)
## Data sets related to 'US':
nexus.search("US")
## Search for data sets that have 'network' in their name:
nexus.search("name:network")
## Any word can match
nexus.search("blog or US or karate")
Run the code above in your browser using DataCamp Workspace