neuronlist: Create a neuronlist from zero or more neurons

Description Usage Arguments Value See Also Examples

View source: R/neuronlist.R

Description

neuronlist objects consist of a list of neuron objects (usually of class neuron or dotprops) along with an optional attached dataframe containing information about the neurons. neuronlist objects can be indexed using their name or the number of the neuron like a regular list. Both the list itself and the attached data.frame must have the same unique (row)names. If the [ operator is used to index the list, the attached dataframe will also be subsetted.

It is perfectly acceptable not to pass any parameters, generating an empty neuronlist

Usage

1
neuronlist(..., DATAFRAME = NULL)

Arguments

...

objects to be turned into a list

DATAFRAME

an optional data.frame to attach to the neuronlist containing information about each neuron.

Value

A new neuronlist object.

See Also

as.data.frame.neuronlist, neuronlist-dataframe-methods, neuron, dotprops

Other neuronlist: *.neuronlist(), is.neuronlist(), neuronlist-dataframe-methods, neuronlistfh(), nlapply(), read.neurons(), write.neurons()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# generate an empty neuronlist
nl=neuronlist()
# slice an existing neuronlist with regular indexing
kcs5=kcs20[1:5]

# extract a single neuron from a neuronlist
n1=Cell07PNs[[1]]

# list all methods for neuronlist objects
methods(class='neuronlist')

Example output

Loading required package: rgl
Registered S3 method overwritten by 'nat':
  method             from
  as.mesh3d.ashape3d rgl 
Some nat functions depend on a CMTK installation. See ?cmtk and README.md for details.

Attaching package:natThe following objects are masked frompackage:base:

    intersect, setdiff, union

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. 
 [1] -                  [                  [<-                *                 
 [5] /                  +                  as.data.frame      as.neuronlistfh   
 [9] c                  data.frame<-       dimnames           dotprops          
[13] droplevels         head               intersect          mirror            
[17] nvertices          plot               plot3d             potential_synapses
[21] prune              setdiff            subset             summary           
[25] tail               union              with               xform             
[29] xyzmatrix          xyzmatrix<-       
see '?methods' for accessing help and source code

nat documentation built on Sept. 6, 2021, 5:09 p.m.