Learn R Programming

nat (version 1.0.1)

seglist: Make/convert neuron connectivity information into a seglist object

Description

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.igraph will convert a fully connected acyclic ngraph or igraph object into a seglist consisting of exactly one subtree.

Usage

seglist(...)

as.seglist(x, ...)

## S3 method for class 'igraph': as.seglist(x, origin = NULL, Verbose = FALSE, ...)

Arguments

...
for seglist integer vectors to convert to a seglist
x
object passed to be converted to seglist
origin
The origin of the tree (see details)
Verbose
Whether to print progress updates to console (default FALSE)

Value

  • A list with additional class seglist.

    a list with one entry for each unbranched segment.

Details

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.

See Also

neuron

ngraph,igraph

Examples

Run this code
sl=seglist(c(1:2),c(2:6))

Run the code above in your browser using DataLab