Closed JosiahParry closed 9 months ago
One note is that this would require vctrs
to become an explicit dependency rather than an implicit one as it presently is (due to recursive import of dplyr etc.)
Agreed, and big :+1: to this looking at the old code
I say old because the function should probably be superseded by a function in the {od}
package which {stplanr}
already imports
https://github.com/ropensci/stplanr/blob/9661722564d550c24a62d7abcbb4ea8bff55435b/DESCRIPTION#L50
Wondering if the function should move across and maybe call od::matrices_to_od()
or whatever the function ends up being called. Thoughts?
See here for the closest thing in that new package, the aim of which was and is still (when time allows) to split out all the OD processing code from {stplanr}
which is, truth be told, a bit of a bloated metapackage... So any wider points on general 'where to put things' etc welcome, big refactor of this and related package could be overdue.
I wanted to propose a possible speed enhancement for
mats2line()
. The current function useslapply()
which is great for smaller amounts of data but when the size gets larger, its performance slows down greatly. This is a semi-vectorized approach that is much more performant at higher volumes though I will note that the use ofsfheaders
increases the memory consumption but as you can see here, for 10k points, its marginal.