Verbatim copies of flycircuit-specific functions
tidy up functions
WIP: function to calculate distances/dotprods

* so far only sets up which pairs of neurons to calculate
Pass vector of distances to NNDistFun

* this should be a completely silent in almost all circumstances
Implement collection of distances/dotprods
bug fix handling missing argument
refactor to simplify mlply call

* named function makes intent clearer
Fix default argument of ReturnCounts in makeprobmat
Tidy-up and provide basic documentation for score matrix functions
Add wrapper function for creating score matrix using smat functions
Import mlply from plyr (prevents NOTE in R CMD check)
Fix character check for subset argument
Fix subsetting to not use subset function within calc_dist_dotprods()

Fixes a NOTE in R CMD check
Fix default subset to use query neuron names as well as target in calc_dists_dotprods()
Add tests for score matrix functions
sty: mostly formatting
doc fixes
Add random_pairs helper function
Document random_pairs
calc_dists_dotprods(subset) defaults to NULL

this is easier to handle in calling functions