ENH: move network analysis stuff into R s.t. its easy to be ants/antsr consistent