neuronlist: Create a neuronlist from zero or more neurons

View source: R/neuronlist.R

neuronlistR Documentation

Create a neuronlist from zero or more neurons

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

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(), neuronlistz(), nlapply(), read.neurons(), write.neurons()

Examples

# generate an empty neuronlist
nl=neuronlist()
# slice an existing neuronlist with regular indexing
kcs5=kcs20[1:5]

# simple summary of neuronlist contents
Cell07PNs
# subset to make a smaller neuronlist
Cell07PNs[1:3]
# extract a single neuron from a neuronlist
n1=Cell07PNs[[1]]
n1


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

natverse/nat documentation built on Feb. 19, 2024, 7:19 a.m.