newEdge: Create a new vertex or edge in a Ubigraph

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/api.R

Description

These functions communicate with the Ubigraph server and create a node or an edge in the graph, or alternatively remove previously created edges or nodes.

Usage

1
2
3
4
newEdge(src, dest, ..., id = NA, server = "http://127.0.0.1:20738/RPC2", .attrs = list(...), curl = getCurlHandle())
newVertex(id = NA, ..., server = "http://127.0.0.1:20738/RPC2", .attrs = list(...), curl = getCurlHandle())
removeEdge(id, server = "http://127.0.0.1:20738/RPC2", curl = getCurlHandle())
removeVertex(id, server = "http://127.0.0.1:20738/RPC2", curl = getCurlHandle())

Arguments

id

a user-supplied identifier to use for the Ubigraph object

src

an identifier of an existing Ubigraph object

dest

an identifier of an existing Ubigraph object

...

additional name = value that specify attributes of the vertex or edge. These are passed on to setAttributes.

server

the identity of the XML-RPC server object, i.e. machine and port

.attrs

an alternative way to specify attributes to be passed on to setAttributes.

curl

a curl handle which can be specified by the caller or indirectly via a Ubigraph-class server object. This is important for efficiency as we want to reuse existing, open connections.

Value

An object of class VertexID-class or EdgeID-class depending on the type of object in the Ubigraph that is created.

Author(s)

Duncan Temple Lang

References

http://ubietylab.net/ubigraph/index.html

See Also

Ubigraph

Examples

1
2
3
4
5
6
7
8
 if(isUbigraphRunning()) { # just for testing the example
    a = newVertex()
    b = newVertex()
    c = newVertex(label = "C", color = "red", size = 2)
 
    e = newEdge(a, b)
 }
 

omegahat/RUbigraph documentation built on May 24, 2019, 1:55 p.m.