SteffenMoritz/imputeTS

Conflict with spacetime/raster

renelikestacos opened this issue · 4 comments

Maybe not an issue but using ImputeTS, Spacetime together, I am facing conflicts from one of the packages ImputeTS is depending on.

I am building a rasterbrick and clean it with ImputeTS, then I am converting it into Spacetime and it appears the following error message.

Found more than one class "xts" in cache; using the first, from namespace 'spacetime' Also defined by ‘quantmod’

Can you recall this issue?

Thanks a lot for leaving a note. I am always happy when users notify me about issues they are facing.

For the issue you encountered:
Think this is a warning message (not an error). Which means there is just a message but the program runs through as planned. (an error would stop execution)

From the message I would say it is the usage of package "spacetime" together with package "quantmod" which causes this warning. So if you do not use imputeTS the warning should still be there.

Thanks again for posting 👍

What i sent you is indeed a warning but it ends in an error by loading Spacetime. The workaround would be calling the necessary functions from your packages through like imputeTS::na.interpolation(). Thanks for providing your ImputeTS package, I am using it quite a lot. Cheers

"but it ends in an error by loading Spacetime." Oh thats interesting. Would you mind sharing a minimum example that runs into the error. I tried loading the packages library("imputeTS"), library("spacetime"), library(quantmod") together. Just from loading the packages no error occurs yet. (you only get the warning message that na.locf is defined in all 3 packages and the one from the last loaded package is used ... this message:" The following object is masked from ‘package:imputeTS’: na.locf ")

Closed - as I was not able to replicate the error.
If anybody runs into this error again and does not mind sharing a minimum reproducible example I will happily try to fix it (just open a new issue then)