jdtuck / fdasrvf_R

Functional Data Analysis using Square-Root Slope Framework
10 stars 13 forks source link

Package dependencies #21

Closed astamm closed 5 months ago

astamm commented 1 year ago

In the process of documenting and improving code coverage, I noticed that a lot of dependencies of fdasrvf are actually imported for the use of a single function. This is true for lpSolve, Matrix, mvtnorm, tolerance and viridisLite. It could be good to think about in-house replacement for these functions which would lead to removing these dependencies.

Similarly,

but these are more specialised and might not be trivial to rewrite on our own.

jdtuck commented 1 year ago

That is a thought, we could for tolerance, mvtnorm, coda, and Matrix. lpSolve would be more difficult and viridisLite. I will have to look at fields. Something to work on on...

astamm commented 1 year ago

On my current branch, I already removed the dependency to matrixcalc which was used only for computing the Van der Monde matrix. I also removed methods which was used only for is() which I replaced with inherits() and I removed splines and parallel from the Imports field since these are R core packages.

If we can come up with our own implementation of rmvnorm() we could remove dep to mvtnorm. For viridisLite, I think we should not force the user to use the viridis palette. Essentially, we could default to an existing palette in R and let the user replace that setting with a viridis palette if he thinks that's better.

Similarly, Matrix is only used to transform a sparse matrix into dense form. That should be easily replaceable.

jdtuck commented 1 year ago

On viridisLite, there are image warping functions, where I prefer that map over any other map in R for displaying the results, let me think on this.