navis.read_rda¶
- navis.read_rda(f, combine=True, neurons_only=True, **kwargs)[source]¶
Read objects from nat R data (.rda) file.
Currently supports parsing neurons, dotprops and mesh3d. Note that this is rather slow and I do not recommend doing this for large collections of neurons. For large scale conversion I recommend using the R interface (
navis.interfaces.r
, see online tutorials) viarpy2
.- Parameters:
f (str) – Filepath.
combined (bool) – What to do if there are multiple neuronlists contained in the RDA files. By default, we will combine them into a single NeuronList but you can also choose to keep them as separate neuronlists.
neurons_only (bool) – Whether to only parse and return neurons and dotprops found in the RDA file.
**kwargs – Keyword arguments passed to the construction of Tree/MeshNeuron/Dotprops. You can use this to e.g. set meta data.
- Returns:
navis.NeuronList – If
combine=True
andneurons_only=True
returns a single NeuronList with the parsed neurons.dict – If
combine=False
orneurons_only=False
returns a dictionary with the original R object name as key and the parsed object as value.