Last data update: 2014.03.03

R: Class "AgEdge": A class to describe an edge for a Ragraph...
AgEdge-classR Documentation

Class "AgEdge": A class to describe an edge for a Ragraph object

Description

This class is used to represent edges for the Ragraph class. One can retrieve various pieces of information as well as draw them.

Objects from the Class

Objects can be created by calls of the form new("AgEdge", ...).

Slots

arrowhead:

Object of class "character" The style of arrowhead for this edge.

arrowsize:

Object of class "character" A scale factor for the length of the arrow heads & tails

arrowtail:

Object of class "character" The style of arrowtail for this edge.

color:

Object of class "character" The edge color.

dir:

Object of class "character" The edge direction.

ep:

Object of class "xyPoint" The end point of the edge.

head:

Object of class "character" The head node for this edge.

lty:

Object of class "character" The edge line type.

lwd:

Object of class "numeric" The edge line width.

sp:

Object of class "xyPoint" The starting point of the edge.

splines:

Object of class "list" A list of BezierCurve objects

tail:

Object of class "character" The tail node for this edge.

txtLabel:

Object of class "character" The edge text label.

Methods

splines

Returns the splines slot

sp

Returns the sp slot

ep

Returns the ep slot

numSplines

Returns the number of splines

getSpline

Convenience method to retrieve a specific spline

show

Displays a concise description of the object

lines

Draws the edge

head

Gets the head slot

tail

Gets the tail slot

txtLabel

Returns any label for this edge

arrowhead

Retrieves the arrowhead slot.

arrowtail

Retrieves the arrowtail slot.

arrowsize

Retrieves the arrowsize slot.

Author(s)

Jeff Gentry

See Also

Ragraph, BezierCurve, xyPoint

Examples

V <- letters[1:10]
M <- 1:4
g1 <- randomGraph(V, M, .2)
z <- agopen(g1,name="foo")
x <- AgEdge(z)  ## list of AgEdge objects

vv <- x[[1]]
vv
## Demonstrate the methods of this class
splines(vv)
sp(vv)
ep(vv)
numSplines(vv)
getSpline(vv, 1)
head(vv)
tail(vv)
txtLabel(vv)
arrowhead(vv)
arrowtail(vv)
arrowsize(vv)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Rgraphviz)
Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Rgraphviz/AgEdge-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: AgEdge-class
> ### Title: Class "AgEdge": A class to describe an edge for a Ragraph object
> ### Aliases: AgEdge-class AgEdge AgEdge<- splines sp ep getSpline
> ###   numSplines head tail arrowsize lines,AgEdge-method show,AgEdge-method
> ###   arrowsize,AgEdge-method color,AgEdge-method ep,AgEdge-method
> ###   getSpline,AgEdge-method head,AgEdge-method numSplines,AgEdge-method
> ###   sp,AgEdge-method splines,AgEdge-method tail,AgEdge-method
> ###   txtLabel,AgEdge-method txtLabel arrowhead,AgEdge-method arrowhead
> ###   arrowtail,AgEdge-method arrowtail
> ### Keywords: classes
> 
> ### ** Examples
> 
> V <- letters[1:10]
> M <- 1:4
> g1 <- randomGraph(V, M, .2)
> z <- agopen(g1,name="foo")
> x <- AgEdge(z)  ## list of AgEdge objects
> 
> vv <- x[[1]]
> vv
An edge between f and c with 1 BezierCurve objects: 
240,412 240,389 240,356 240,334 
> ## Demonstrate the methods of this class
> splines(vv)
[[1]]
240,412 240,389 240,356 240,334 

> sp(vv)
x: 0, y: 0
> ep(vv)
x: 0, y: 0
> numSplines(vv)
[1] 1
> getSpline(vv, 1)
240,412 240,389 240,356 240,334 
> head(vv)
[1] "f"
> tail(vv)
[1] "c"
> txtLabel(vv)
An object of class "AgTextLabel"
Slot "labelText":
character(0)

Slot "labelLoc":
x: , y: 

Slot "labelJust":
character(0)

Slot "labelWidth":
integer(0)

Slot "labelColor":
character(0)

Slot "labelFontsize":
numeric(0)

> arrowhead(vv)
[1] "none"
> arrowtail(vv)
[1] "none"
> arrowsize(vv)
[1] "1"
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>