natverse / nat

NeuroAnatomy Toolbox: An R package for the (3D) visualisation and analysis of biological image data, especially tracings of single neurons.
https://natverse.org/nat/
64 stars 29 forks source link

WIP: added withMeta parameter to nlapply #501

Open dokato opened 2 years ago

dokato commented 2 years ago

Details in #500

codecov[bot] commented 2 years ago

Codecov Report

Merging #501 (55c92be) into master (49d578d) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #501      +/-   ##
==========================================
+ Coverage   75.73%   75.75%   +0.01%     
==========================================
  Files          48       48              
  Lines        5906     5910       +4     
==========================================
+ Hits         4473     4477       +4     
  Misses       1433     1433              
Impacted Files Coverage Δ
R/neuronlistfh.R 48.94% <ø> (ø)
R/neuronlist.R 81.52% <100.00%> (+0.21%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 49d578d...55c92be. Read the comment docs.

dokato commented 2 years ago

Thanks @jefferis , maybe it requires more thinking on design indeed. The idea was to have access within the nlapply loop to the attributes of the neuron. So for example if I have a neuronlist nl with data.frame containing soma location or NULL, I can nlapply over nl and perform separate actions for each cases.

I know it's possible with subset, but then you need to stitch neuronlists together, which messes the order etc. I found out a couple of times that it'd be handy.