Open Bisaloo opened 7 months ago
You are right that most of the functions I was using were already vectorized.
The only one I had an issue with was match() in numberize.R. It didn't natively vectorize it as I expected and it might be an issue in my understanding of how it works. The only way I got it to work was to use apply()
which felt like kicking the can down the road. That's why I didn't fully vectorize it natively.
After the CRAN release, I will see if I can come up with a solution for it.
Partially fixed by #15
Opening this issue as a reminder of the discussion started in https://github.com/epiverse-trace/numberize/pull/6#discussion_r1532548560.
Most R functions are vectorized by default (using loops in C) so it may be much more efficient to rely on this rather than a
vapply()
loop.