conroylau / lpinfer

lpinfer: An R Package for Inference in Linear Programs
GNU General Public License v3.0
3 stars 5 forks source link

fsst expm package not found #61

Closed a-torgovitsky closed 4 years ago

a-torgovitsky commented 4 years ago
r <- fsst(data, lpm, .3, R = 10, solver = "gurobi", cores = 1, progress = TRUE)
Error in loadNamespace(name) : there is no package called 'expm'

These are the types of routine errors that should be caught in unit tests!

a-torgovitsky commented 4 years ago

Sorry, to be clear, I think the issue is that expm is not in Imports

conroylau commented 4 years ago

Done! I have added expm to imports. I am sorry that the unit test did not catch the problem. I am still looking into why it did not. I am not sure if it is because I already installed expm on my computer.

a-torgovitsky commented 4 years ago

I don't think so, since even if it is installed it still needs to be loaded or else there will be an error.

Does the unit testing package restart the R session before testing? If not, then it is probably because you had library("expm") already. However, I would expect that the testing package does automatically restart before testing...