seglengths {nat} | R Documentation |
Calculate length of all segments in neuron
Description
Calculate length of all segments in neuron
Usage
seglengths(x, all = FALSE, flatten = TRUE, sumsegment = TRUE)
Arguments
x |
A neuron |
all |
Whether to calculate lengths for all segments when there are
multiple subtrees (default: |
flatten |
Whether to flatten the lists of lists into a single list when
|
sumsegment |
Whether to return the length of each segment (when
|
Details
A segment is an ubranched portion of neurite consisting of at least
one vertex joined by edges.Only segments in x$SegList will be calculated
unless all=TRUE
. Segments containing only one point will have 0
length.
Value
A vector
of lengths for each segment or when
sumsegment=FALSE
a list
of vectors
See Also
Examples
summary(seglengths(Cell07PNs[[1]]))
hist(unlist(seglengths(Cell07PNs[[1]], sumsegment = FALSE)),
br=20, main='histogram of edge lengths', xlab='edge lengths /microns')
[Package nat version 1.8.24 Index]