Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,18 @@ Suggests:
Description: Tools to create and modify network objects. The network class can represent a range of relational data types, and supports arbitrary vertex/edge/graph attributes.
License: GPL (>=2)
URL: http://statnet.org/
RoxygenNote: 6.1.1
Collate:
'access.R'
'as.edgelist.R'
'assignment.R'
'coercion.R'
'constructors.R'
'fileio.R'
'layout.R'
'misc.R'
'network-package.R'
'operators.R'
'plot.R'
'printsum.R'
'zzz.R'
353 changes: 168 additions & 185 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,194 +1,177 @@
#Set up our dynamic library
useDynLib(network, .registration = TRUE)

#Import some required symbols
import(utils)

importFrom("grDevices", "colors", "gray")
importFrom("graphics", "locator", "par", "plot", "polygon", "rect",
"strheight", "strwidth", "text")
importFrom("stats", "rnorm", "na.omit")
importFrom("tibble", "tibble", "as.tibble", "as_tibble")
importFrom("magrittr", "%>%", "set_names")

#Export everything except symbols that start with '.' or end with '_R'.
#exportPattern("^[^\\.].*[^_][^R]$")

# the %c% operator may have already been defined by the sna library if loaded first
# but we can't figure out a way to conditionally export it
export("%c%")
# Generated by roxygen2: do not edit by hand

# explicity export only a subset of functions
export(
add.edge,
add.edge.network,
add.edges,
add.edges.network,
add.vertices,
add.vertices.network,
as.color,
as.matrix.network,
as.matrix.network.adjacency,
as.matrix.network.edgelist,
as.matrix.network.incidence,
as.network,
as.network.default,
as.network.matrix,
as.network.network,
as.sociomatrix,
as.edgelist,
# TODO: Don't export as.edgelist.matrix once no one depends on it.
as.edgelist.matrix,
is.edgelist,
"%c%.network",
delete.edge.attribute,
delete.edges,
delete.network.attribute,
delete.vertex.attribute,
delete.vertices,
"%e%",
"%e%<-",
"%eattr%",
"%eattr%<-",
get.edge.attribute,
get.edgeIDs,
get.dyads.eids,
get.edges,
get.edge.value,
get.inducedSubgraph,
get.neighborhood,
get.network.attribute,
get.vertex.attribute,
has.loops,
is.adjacent,
is.bipartite,
is.color,
is.directed,
is.discrete,
is.discrete.character,
is.discrete.numeric,
is.hyper,
is.multiplex,
is.na.network,
is.network,
has.edges,
list.edge.attributes,
list.network.attributes,
list.vertex.attributes,
mixingmatrix,
"%n%",
"%n%<-",
"%nattr%",
"%nattr%<-",
network,
"<-.network",
"|.network",
"-.network",
"!.network",
"[<-.network",
"[.network",
"*.network",
"&.network",
"+.network",
network.adjacency,
network.arrow,
network.bipartite,
network.copy,
network.density,
network.dyadcount,
network.edgecount,
network.edgelabel,
network.edgelist,
network.incidence,
network.initialize,
network.layout.circle,
network.layout.fruchtermanreingold,
network.layout.kamadakawai,
network.loop,
network.naedgecount,
#networkOperatorSetup,
network.size,
network.vertex,
network.vertex.names,
"network.vertex.names<-",
permute.vertexIDs,
plot.network,
plot.network.default,
plotArgs.network,
print.mixingmatrix,
print.network,
print.summary.character,
print.summary.network,
prod.network,
#readAndVectorizeLine,
read.paj,
#read.paj.simplify,
"%s%",
set.edge.attribute,
set.edge.value,
set.network.attribute,
set.vertex.attribute,
summary.character,
summary.network,
sum.network,
#switchArcDirection,
"%v%",
"%v%<-",
valid.eids,
"%vattr%",
"%vattr%<-",
which.matrix.type

)

# register S3 methods

S3method('%c%',network)
S3method(add.edge, network)
S3method(add.edges, network)
S3method(add.vertices, network)
S3method(as.network, default)
S3method(as.network, matrix)
S3method(as.network, network)
S3method(as.matrix, network)
S3method(print,mixingmatrix)
S3method(print,network)
S3method(print,summary.network)
S3method(print,summary.character)
S3method(summary,character)
S3method(summary,network)
S3method(plot,network)
S3method(plot.network,default)
S3method(is.na,network)
S3method('+',network)
S3method('-',network)
S3method('*',network)
S3method('&',network)
S3method('|',network)
S3method('!',network)
S3method('[',network)
S3method('[<-',network)
S3method(prod,network)
S3method(sum,network)
S3method(as.edgelist,network)
S3method("!",network)
S3method("%c%",network)
S3method("&",network)
S3method("*",network)
S3method("+",network)
S3method("-",network)
S3method("[",network)
S3method("[<-",network)
S3method("|",network)
S3method(add.edge,network)
S3method(add.edges,network)
S3method(add.vertices,network)
S3method(as.edgelist,matrix)
S3method(as.edgelist,network)
S3method(as.edgelist,tbl_df)
S3method(mixingmatrix,network)

S3method(as.matrix,network)
S3method(as.matrix.network,adjacency)
S3method(as.matrix.network,edgelist)
S3method(as.matrix.network,incidence)
S3method(as.network,default)
S3method(as.network,matrix)
S3method(as.network,network)
S3method(as.tibble,network)
S3method(as_tibble,network)

S3method(get.vertex.attribute,network)
S3method(is.na,network)
S3method(list.vertex.attributes,network)
S3method(mixingmatrix,network)
S3method(network.dyadcount,network)
S3method(network.edgecount,network)
S3method(network.naedgecount,network)
S3method(network.size,network)

S3method(list.vertex.attributes,network)
S3method(get.vertex.attribute,network)

# These are not 'real' S3 methods, as there is no corresponding class
# but they are dispatched by as.matrix.network and are flagged by check if not marked here
S3method(as.matrix.network,adjacency)
S3method(as.matrix.network,edgelist)
S3method(as.matrix.network,incidence)

S3method(plot,network)
S3method(plot.network,default)
S3method(print,mixingmatrix)
S3method(print,network)
S3method(print,summary.character)
S3method(print,summary.network)
S3method(prod,network)
S3method(sum,network)
S3method(summary,character)
S3method(summary,network)
export("!.network")
export("%c%")
export("%c%.network")
export("%e%")
export("%e%<-")
export("%eattr%")
export("%eattr%<-")
export("%n%")
export("%n%<-")
export("%nattr%")
export("%nattr%<-")
export("%s%")
export("%v%")
export("%v%<-")
export("%vattr%")
export("%vattr%<-")
export("&.network")
export("*.network")
export("+.network")
export("-.network")
export("<-.network")
export("[.network")
export("[<-.network")
export("network.vertex.names<-")
export("|.network")
export(add.edge)
export(add.edge.network)
export(add.edges)
export(add.edges.network)
export(add.vertices)
export(add.vertices.network)
export(as.color)
export(as.edgelist)
export(as.edgelist.matrix)
export(as.matrix.network)
export(as.matrix.network.adjacency)
export(as.matrix.network.edgelist)
export(as.matrix.network.incidence)
export(as.network)
export(as.network.default)
export(as.network.matrix)
export(as.network.network)
export(as.sociomatrix)
export(delete.edge.attribute)
export(delete.edges)
export(delete.network.attribute)
export(delete.vertex.attribute)
export(delete.vertices)
export(get.dyads.eids)
export(get.edge.attribute)
export(get.edge.value)
export(get.edgeIDs)
export(get.edges)
export(get.inducedSubgraph)
export(get.neighborhood)
export(get.network.attribute)
export(get.vertex.attribute)
export(has.edges)
export(has.loops)
export(is.adjacent)
export(is.bipartite)
export(is.color)
export(is.directed)
export(is.discrete)
export(is.discrete.character)
export(is.discrete.numeric)
export(is.edgelist)
export(is.hyper)
export(is.multiplex)
export(is.na.network)
export(is.network)
export(list.edge.attributes)
export(list.network.attributes)
export(list.vertex.attributes)
export(mixingmatrix)
export(network)
export(network.adjacency)
export(network.arrow)
export(network.bipartite)
export(network.copy)
export(network.density)
export(network.dyadcount)
export(network.edgecount)
export(network.edgelabel)
export(network.edgelist)
export(network.incidence)
export(network.initialize)
export(network.layout.circle)
export(network.layout.fruchtermanreingold)
export(network.layout.kamadakawai)
export(network.loop)
export(network.naedgecount)
export(network.size)
export(network.vertex)
export(network.vertex.names)
export(permute.vertexIDs)
export(plot.network)
export(plot.network.default)
export(plotArgs.network)
export(print.mixingmatrix)
export(print.network)
export(print.summary.character)
export(print.summary.network)
export(prod.network)
export(read.paj)
export(set.edge.attribute)
export(set.edge.value)
export(set.network.attribute)
export(set.vertex.attribute)
export(sum.network)
export(summary.character)
export(summary.network)
export(valid.eids)
export(which.matrix.type)
import(utils)
importFrom(grDevices,colors)
importFrom(grDevices,gray)
importFrom(graphics,locator)
importFrom(graphics,par)
importFrom(graphics,plot)
importFrom(graphics,polygon)
importFrom(graphics,rect)
importFrom(graphics,strheight)
importFrom(graphics,strwidth)
importFrom(graphics,text)
importFrom(magrittr,"%>%")
importFrom(magrittr,set_names)
importFrom(stats,na.omit)
importFrom(stats,rnorm)
importFrom(tibble,as.tibble)
importFrom(tibble,as_tibble)
importFrom(tibble,tibble)
useDynLib(network, .registration = TRUE)
Loading