Robert,

as a hydrologist I am often calculating moving averages. For that, function SMA of package TTR was very convenient when dealing with time series.

Yesterday I noted, that applying the function gave a strange error:

> Ts.df[,4] <- SMA(Ts.df[,3],n=i) # moving average, at end of period
Error in function (classes, fdef, mtable)  :
  unable to find an inherited method for function "reclass", for signature "numeric"

If some time of fiddling around with the data, I noticed, that the error occurs only when package "raster" is loaded. As soon as I detach it, the command is executed correctly.

When I load library "TTR" first and afterwards "raster", I get the following messages:

Loading required package: xts
Loading required package: zoo

Attaching package: ‘zoo’

The following object(s) are masked from ‘package:base’:

    as.Date, as.Date.numeric


Attaching package: ‘xts’

The following object(s) are masked from ‘package:raster’:

    reclass

I can even have raster and TTR simultaneously loaded, as long as I load TTR first and than raster. The other sequence (I am using package "raster" more frequently than TTR) causes the problem.

Is there a change to fix that or should I just live with this workaround (i.e. loading packages in the right sequence).

Klaus Jacobi
k_jacobi@surf2000.de
www.disk-world.net




	[[alternative HTML version deleted]]

