[.neuronlistfh | R Documentation |
[.neuronlistfh
extracts either a sublist from a
neuronlistfh (converting it to a regular in memory list in the process)
or its attached data.frame.
## S3 method for class 'neuronlistfh'
x[i, j, drop]
x |
A neuronlistfh object |
i , j |
elements to extract or replace. Numeric, logical or character or,
for the [ get method, empty. See details and the help for
|
drop |
logical. If |
Note that if i is a numeric or logical indexing vector, it will be converted internally to a vector of names by using the (sorted) names of the objects in x (i.e. names(x)[i])
A new in-memory neuronlist
or when using two subscripts, a
data.frame
- see examples.
neuronlistfh
, [.neuronlist
,
[.data.frame
, [<-.data.frame
,
Other neuronlistfh:
neuronlistfh()
,
read.neuronlistfh()
,
remotesync()
,
write.neuronlistfh()
# make a test neuronlistfh backed by a temporary folder on disk
tf=tempfile('kcs20fh')
kcs20fh<-as.neuronlistfh(kcs20, dbdir=tf)
# get first neurons as an in memory neuronlist
class(kcs20fh[1:3])
# extract attached data.frame
str(kcs20fh[,])
# or part of the data.frame
str(kcs20fh[1:2,1:3])
# data.frame assignment (this one changes nothing)
kcs20fh[1:2,'gene_name'] <- kcs20fh[1:2,'gene_name']
# clean up
unlink(tf, recursive=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.