Package ‘network’

3y ago
298.19 KB
80 Pages
Last View : 2d ago
Last Download : 6m ago
Upload by : Asher Boatman

Package ‘network’October 7, 2020Version 1.16.1Date 2020-10-06Title Classes for Relational DataDepends R ( 2.10), utilsImports tibble, magrittrSuggests sna, statnet.common, testthat, covrDescription 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 6.1.1Collate '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'NeedsCompilation yesAuthor Carter T. Butts [aut, cre],David Hunter [ctb],Mark Handcock [ctb],Skye Bender-deMoll [ctb],Jeffrey Horner [ctb],Li Wang [ctb]Maintainer Carter T. Butts Repository CRANDate/Publication 2020-10-07 07:00:02 UTCR topics documented:network-package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .add.edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .add.vertices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1357

R topics documented:2as.color . . . . . . .as.edgelist . . . . . . . .as.sociomatrix . . . .attribute.methods . .deletion.methods . .edgeset.constructors .emon . . . . . . . .flo . . . . . . . . . .get.edges . . . . . .get.inducedSubgraphget.neighborhood . .has.edges . . . . . .is.adjacent . . . . . .loading.attributes . .missing.edges . . . .network . . . . . . .network.arrow . . . .network.density . . .network.dyadcount .network.edgecount .network.edgelabel . .network.extraction .network.indicators .network.initialize . .network.layout . . .network.loop . . . .network.operators . .network.size . . . . .network.vertex . . .permute.vertexIDs . . . . . .read.paj . . . . . . . . . . .valid.eids . . . . . .which.matrix.type . 484951535457586162636468707173757678

network-package3network-packageClasses for Relational DataDescriptionTools to create and modify network objects. The network class can represent a range of relationaldata types, and supports arbitrary vertex/edge/graph attributes.DetailsThe network package provides tools for creation, access, and modification of network class objects.These objects allow for the representation of more complex structures than can be readily handledby other means (e.g., adjacency matrices), and are substantially more efficient in handling large,sparse networks. While the full capabilities of the network class can only be exploited by meansof the various custom interface methods (see below), many simple tasks are streamlined throughthe use of operator overloading; in particular, network objects can often be treated as if they wereadjacency matrices (a representation which will be familiar to users of the sna package). networkobjects are compatible with the sna package, and are required for many packages in the statnetbundle.Basic information on the creation of network objects can be found by typing help(network). Tolearn about setting, modifying, or deleting network, vertex, or edge attributes, see help(attribute.methods).For information on custom network operators, type help(network.operators); information onoverloaded operators can be found via help(network.extraction). Additional help topics arelisted e:network1.14May 7, 2016R ( 2.10), utilssna, statnet.common ( 3.1-0)GPL ( 2)Index of documentation .methodsedgeset.constructorsemonAdd Edges to a Network ObjectAdd Vertices to an Existing NetworkCoerce a Network Object to Matrix FormCoercion from Matrices to Network ObjectsCoerce One or More Networks to Sociomatrix FormAttribute Interface Methods for the NetworkClassRemove Elements from a Network ObjectEdgeset Constructors for Network ObjectsInterorganizational Search and Rescue Networks(Drabek et al.)

ajsum.networkvalid.eidswhich.matrix.typeFlorentine Wedding Data (Padgett)Retrieve Edges or Edge IDs Associated with aGiven VertexRetrieve Induced Subgraphs and CutsObtain the Neighborhood of a Given VertexDetermine Whether Two Vertices Are AdjacentExamples of how to load vertex and edgeattributes into networksIdentifying and Counting Missing Edges in aNetwork ObjectNetwork ObjectsAdd Arrows or Segments to a PlotCompute the Density of a NetworkReturn the Number of (Possibly Directed) Dyadsin a Network ObjectReturn the Number of Edges in a Network ObjectPlots a label corresponding to an edge in anetwork plot.Extraction and Replacement Operators forNetwork ObjectsIndicator Functions for Network PropertiesInitialize a Network Class ObjectVertex Layout Functions for plot.networkAdd Loops to a PlotNetwork OperatorsClasses for Relational DataReturn the Size of a NetworkAdd Vertices to a PlotPermute (Relabel) the Vertices Within a NetworkExpand and transform attributes of networks tovalues appropriate for aguments to plot.networkTwo-Dimensional Visualization for NetworkObjectsCombine Networks by Edge Value MultiplicationRead a Pajek Project or Network File andConvert to an R 'Network' ObjectCombine Networks by Edge Value AdditionGet the valid edge which are valid in a networkHeuristic Determination of Matrix Types forNetwork StorageAuthor(s)Carter T. Butts , with help from Mark S. Handcock ,David Hunter , Martina Morris , Skye BenderdeMoll , and Jeffrey Horner .Maintainer: Carter T. Butts

add.edgesadd.edges5Add Edges to a Network ObjectDescriptionAdd one or more edges to an existing network object.Usageadd.edge(x, tail, head, names.eval NULL, vals.eval NULL,edge.check FALSE, .)add.edges(x, tail, head, names.eval NULL, vals.eval NULL, .)Argumentsxan object of class networktailfor add.edge, a vector of vertex IDs reflecting the tail set for the edge to beadded; for add.edges, a list of such vectorsheadfor add.edge, a vector of vertex IDs reflecting the head set for the edge to beadded; for add.edges, a list of such vectorsnames.evalfor add.edge, an optional list of names for edge attributes; for add.edges, a listof length equal to the number of edges, with each element containing a list ofnames for the attributes of the corresponding edgevals.evalfor add.edge, an optional list of edge attribute values (matching names.eval);for add.edges, a list of such listsedge.checklogical; should we perform (computationally expensive) tests to check for thelegality of submitted edges?.additional argumentsDetailsThe edge checking procedure is very slow, but should always be employed when debugging; without it, one cannot guarantee that the network state is consistent with network level variables (seenetwork.indicators). For example, by default it is possible to add multiple edges to a pair ofvertices.Edges can also be added/removed via the extraction/replacement operators. See the associated manpage for details.ValueInvisibly, add.edge and add.edges return pointers to their modified arguments; both functionsmodify their arguments in place.

6add.edgesNoteadd.edges and add.edge were converted to an S3 generic funtions in version 1.9, so they actuallycall and by default, and may call other versions depending on context (i.e. when called with a networkDynamic object).Author(s)Carter T. Butts ReferencesButts, C. T. (2008). “network: a Package for Managing Relational Data in R.” Journal of StatisticalSoftware, 24(2). Alsonetwork, add.vertices, network.extraction, delete.edges, network.edgelistExamples#Initialize a small, empty networkg -network.initialize(3)#Add an edgeadd.edge(g,1,2)g#Can also add edges using the extraction/replacement operators#note that replacement operators are much slower than add.edges()g[,3] -1g[,]#Add multiple edges with attributes to a network# pretend we just loaded in this data.frame from a file# Note: network.edgelist() may be simpler for this caseelData -data.frame(from id c("1","2","3","1","3","1","2"),to id c("1", "1", "1", "2", "2", "3", "3"),myEdgeWeight c(1, 2, 1, 2, 5, 3, 9.5),someLetters c("B", "W", "L", "Z", "P", "Q", "E"),edgeCols ay"),stringsAsFactors FALSE)valueNet -network.initialize(3,loops s.eval ls")),nrow(elData)),vals.eval ,3:5])}))

ticesAdd Vertices to an Existing NetworkDescriptionadd.vertices adds a specified number of vertices to an existing network; if desired, attributes forthe new vertices may be specified as well.Usageadd.vertices(x, nv, vattr NULL, last.mode TRUE, .)Argumentsxan object of class networknvthe number of vertices to addvattroptionally, a list of attributes with one entry per new vertexlast.modelogical; should the new vertices be added to the last (rather than the first) modeof a bipartite network?.possible additional arguments to add.verticesDetailsNew vertices are generally appended to the end of the network (i.e., their vertex IDs begin withnetwork.size(x) an count upward). The one exception to this rule is when x is bipartite andlast.mode FALSE. In this case, new vertices are added to the end of the first mode, with existingsecond-mode vertices being permuted upward in ID. (x’s bipartite attribute is adjusted accordingly.)Note that the attribute format used here is based on the internal (vertex-wise) storage method, asopposed to the attribute-wise format used by network. Specifically, vattr should be a list with oneentry per new vertex, the ith element of which should be a list with an element for every attribute ofthe ith vertex. (If the required na attribute is not given, it will be automatically created.)ValueInvisibly, a pointer to the updated network object; add.vertices modifies its argument in place.Noteadd.vertices was converted to an S3 generic funtion in version 1.9, so it actually calls add.vertices.networkby default and may call other versions depending on context (i.e. when called with a networkDynamicobject).

8as.colorAuthor(s)Carter T. Butts ReferencesButts, C. T. (2008). “network: a Package for Managing Relational Data in R.” Journal of StatisticalSoftware, 24(2). Alsonetwork, get.vertex.attribute, set.vertex.attributeExamples#Initialize a network objectg -network.initialize(5)g#Add five more verticesadd.vertices(g,5)g#Create two more, with attributesvat -replicate(2,list(is.added TRUE,num.added 2),simplify FALSE)add.vertices(g,2,vattr vat)g%v%"is.added"#Values are only present for the new casesg%v%"num.added"#Add to a bipartite networkbip -network.initialize(5,bipartite 3),'bipartite') # how many vertices in first mode?add.vertices(bip,3,last.mode orTransform vector of values into color specificationDescriptionConvenience function to convert a vector of values into a color specification.Usageas.color(x, opacity 1)is.color(x)

as.color9Argumentsxvector of numeric, character or factor values to be transformedopacityoptional numeric value in the range 0.0 to 1.0 used to specify the opacity/transparency(alpha) of the colors to be returned. 0 means fully opaque, 1 means fully transparent.DetailsBehavior of as.color is as follows: integer numeric values: unchanged, (assumed to corespond to values of R’s active palette) integer real values: will be translated to into grayscale values ranging between the max andmin factor: integer values corresponding to factor levels will be used character: if values are valid colors (as determined by is.color) they will be returned as is.Otherwise converted to factor and numeric value of factor returned.The optional opacity parameter can be used to make colors partially transparent (as a shortcut foradjustcolor. If used, colors will be returned as hex rgb color string (i.e. "#00FF0080")The is.color function checks if each character element of x appears to be a color name by comparing it to colors and checking if it is an HTML-style hex color code. Note that it will returnFALSE for integer values.These functions are used for the color parameters of as.color, a vector integer values (corresponding to color palette values) or character colorname. For is.color, a logical vector indicating if each element of x appears to be a # add some transparencyas.color(c('red','green','blue'),0.5) # gives "#FF000080", "#00FF0080", ))

10as.edgelistas.edgelistConvert a network object into a numeric edgelist matrixDescriptionConstructs an edgelist in a sorted format with defined attributes.Usage## S3 method for class 'network'as.edgelist(x, attrname NULL,as.sna.edgelist FALSE, output c("matrix", "tibble"), .)## S3 method for class 'matrix'as.edgelist(x, n, directed TRUE, bipartite FALSE,loops FALSE, vnames seq len(n), .)## S3 method for class 'tbl df'as.edgelist(x, n, directed TRUE, bipartite FALSE,loops FALSE, vnames seq len(n), .)is.edgelist(x)Argumentsxa network object with additional class added indicating how it should be dispatched.attrnameoptionally, the name of an edge attribute to use for edge values; may be a vectorof names if output "tibble"as.sna.edgelistlogical; should the edgelist be returned in edgelist form expected by the snapackage? Ignored if output "tibble"outputreturn type: a matrix or a tibble; see for the difference.additional arguments to other methodsninteger number of vertices in network, value passed to the ’n’ flag on edgelistreturneddirectedlogical; is network directed, value passed to the ’directed’ flag on edgelist returnedbipartitelogical or integer; is network bipartite, value passed to the ’bipartite’ flag onedgelist returnedloopslogical; are self-loops allowed in network?, value passed to the ’loops’ flag onedgelist returnedvnamesvertex names (defaults to vertex ids) to be attached to edgelist for sna packagecompatibility

as.edgelist11DetailsConstructs a edgelist matrix or tibble from a network, sorted tails-major order, with tails first, and,for undirected networks, tail head. This format is required by some reverse-depending packages(e.g. ergm)The provides similar functionality but it does not enforce orderingor set the edgelist class and so should be slightly tests if an object has the class 'edgelist'ValueA matrix in which the first two columns are integers giving the tail (source) and head (target) vertexids of each edge. The matrix will be given the class edgelist.The edgelist has additional attributes attached to it: attr(,"n") the number of vertices in the original network attr(,"vnames") the names of vertices in the original network attr(,"directed") logical, was the original network directed attr(,"bipartite") was the original network bipartite attr(,"loops") does the original network contain self-loopsNote that if the attrname attribute is used the resulting edgelist matrix will have three columns.And if attrname refers to a character attribute, the resulting edgelist matrix will be character ratherthan numeric unless output "tibble".NoteNOTE: this function was moved to network from the ergm package in network version 1.13See AlsoSee also elist(emon[[1]])as.edgelist(emon[[1]],output "tibble")# contrast with unsorted columns[[1]])

12as.matrix.networkas.matrix.networkCoerce a Network Object to Matrix or Table FormDescriptionThe as.matrix methods attempt to coerce their input to a matrix in adjacency, incidence, or edgelist form. Edge values (from a stored attribute) may be used if present. as tibble coerces intoan edgelist in tibble (a type of data.frame) form; this can be especially useful if extrecting acharacter-type edge attribute.Usage## S3 method for class 'network'as.matrix(x, matrix.type NULL, attrname NULL,.)## S3 method for class 'adjacency', attrname NULL,expand.bipartite FALSE, .)## S3 method for class 'edgelist', attrname NULL,as.sna.edgelist FALSE, na.rm TRUE, .)## S3 method for class 'network'as tibble(x, attrnames (match.arg(unit) "vertices"), na.rm TRUE, ., unit c("edges", "vertices"))## S3 method for class 'network'as.tibble(x, attrnames (match.arg(unit) "vertices"), na.rm TRUE, .,unit c("edges","vertices"))## S3 method for class 'incidence', attrname NULL, .)Argumentsxan object of class networkmatrix.typeone of "adjacency", "incidence", "edgelist", or NULLattrnameoptionally, the name of an edge attribute to use for edge values.additional arguments.expand.bipartitelogical; if x is bipartite, should we return the full adjacency matrix (rather thanthe abbreviated, two-mode form)?as.sna.edgelistlogical; should the edgelist be returned in sna edglist form?

as.matrix.network13na.rmlogical; should missing edges/vertices be included in the edgelist formats? Ignored if as.sna.edgelist TRUE.attrnamesoptionally, either a character vector of the names of edge attributes to use foredge values, or a numerical or logical vector to use as indices for selecting themfrom list.edge.attributes(x) or list.vertex.attributes(x) (depending on unit); passing TRUE therefore returns all edge attributes as columnsunitwhether a tibble of edge or vertex attributes should be returned.DetailsIf no matrix type is specified, which.matrix.type will be used to make an educated guess basedon the sh

network.edgecount Return the Number of Edges in a Network Object network.edgelabel Plots a label corresponding to an edge in a network plot. network.extraction Extraction and Replacement Operators for Network Objects network.indicators Indicator Functions for Network Properties network.initialize Initialize a Network Class Object

Related Documents:

Package style descriptive code LQFP (low profile quad flat package) Package body material type P (plastic) JEDEC package outline code MS-026 BCD Mounting method type S (surface mount) Issue date 25-01-2016 Manufacturer package code 98ASS23234W Table 1. Package summary Parameter Min Nom Max Unit package length 9.8 10 10.2 mm package width 9.8 10 .

226 ABS - CBN News TFC Package 227 BRO TFC Package 228 MYX TFC Package 229 Cinema One Global TFC Package 230 DZMM Teleradyo TFC Package . 231 DWRR Radio TFC Package 233 Kapatid TV5 Y Y 235 Net-25 Y Y Y 261 NHK World Premium Y Y 275 SBTN SBTN 300 700 HBO HBO Package .

C h a p t e r 1 Salesforce Managed Package This chapter includes the following topics: Salesforce Managed Package Overview, 5 Salesforce Managed Package URLs, 5 Installing the Managed Package, 6 Uninstalling and Deleting the Managed Package, 9 More Information, 10 Salesforce Managed Package Overview You need the Informatica Cloud Real Time for Salesforce package (the .

The Astro TV subscribed television had 48 channels consisting of Citta package, Arena package, Cinema package, and dynasty package. The Citta package was a subscribed basic package which consisted of children channel, science, news, entertainment, music, film and terrestrial TV. There were 5 Astro TV production channels in that package:

SPRU811 Flip Chip Ball Grid Array Package 9 2.1 Package Drawing Outline The flip chip BGA package outline drawing provides important mechanical design data, including package dimensions (length, width, and thickness) and solder ball number, size, and pitch. Package mechanica

Package Discontinued "VT" Package (mm) Replacement "UC" Package (mm) Thickness 1.15 0.1 0.775 0.1 BGA Ball Coplanarity 0.08 0.1 Shipment trays ITW 14 14 BGA 41414-11-0819-9 (150C) PEAK TX BG1414 1.25 0717 6 (150C) Compared to the discontinued package, the thinner replacement package contains a different characteristic shape at solder .

QFN Package Mount Manual Seiko Epson Corporation 5 (Rev.1.0) 1. Outline QFN (Quad Flat Non-leaded package) is a "Peripheral package", and has terminal pads along the four edges of the bottom and side surface. Unlike the QFP (Quad Flat Package) which is also peripheral package, connection terminals of the QFN do not protrude outside the .

1) DNA is made up of proteins that are synthesized in the cell. 2) Protein is composed of DNA that is stored in the cell. 3) DNA controls the production of protein in the cell. 4) The cell is composed only of DNA and protein. 14) The diagram below represents a portion of an organic molecule. This molecule controls cellular activity by directing the