seglist | R Documentation |
seglist
makes a seglist object from a list of integer
vectors of raw vertex ids. As a convenience if a vector of numeric ids are
passed these are assumed to specify a neuron with 1 segment.
as.seglist.neuron
will extract the seglist from a neuron,
optionally extracting all subtrees (all=TRUE
) and (in this case)
flattening the list into a single hierarchy when flatten=TRUE
.
n.b. when all=TRUE
but flatten=FALSE
the result will
always be a list of seglist
objects (even if the neuron has
only one subtree i.e. is fully connected).
as.seglist.igraph
will convert a fully connected acyclic
ngraph or igraph object into a seglist consisting of exactly one subtree.
seglist(...)
as.seglist(x, ...)
## S3 method for class 'neuron'
as.seglist(x, all = FALSE, flatten = FALSE, ...)
## S3 method for class 'igraph'
as.seglist(x, origin = NULL, Verbose = FALSE, ...)
... |
for |
x |
object passed to be converted to seglist |
all |
Whether to include segments from all subtrees |
flatten |
When |
origin |
The origin of the tree (see details) |
Verbose |
Whether to print progress updates to console (default FALSE) |
see neuron
for further information about seglists.
If the graph vertices have vid
attributes, typically defining
the original vertex ids of a graph that was then decomposed into subgraphs,
then the origin is assumed to refer to one of these vids not a raw vertex
id of the current graph. The returned seglist will also contain these
original vertex ids.
The head of the first segment in the seglist will be the origin.
A list
with additional class seglist
.
a list
with one entry for each unbranched segment.
neuron
ngraph,igraph
sl=seglist(c(1:2),c(2:6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.