Hey, I am having troubles using the 'predict' function with in the Raster package. I am using pm<-predict(mm, predictors) where mm is the mahalanobis distance and the predictors are a stack of 6 raster layers containing environmental variables. When I try to run the prediction I get the following warning message: Warning message: In layerNames(x): the layerNames function is obsolete. Use "names" instead. I have done some research on raster package updates and in the summer they added the function 'names' to replace 'layerNames'. I am wondering if there is a bug in the predict function that still relies on the layerNames function? Any help would be greatly appreciated. Thank you. -- View this message in context: http://r.789695.n4.nabble.com/Predict-function-in-Raster-package-tp4651027.html Sent from the R help mailing list archive at Nabble.com.
On Nov 27, 2012, at 2:33 PM, megmurr wrote:> Hey, > > I am having troubles using the 'predict' function with in the Raster > package. I am using pm<-predict(mm, predictors) where mm is the > mahalanobis distance and the predictors are a stack of 6 raster layers > containing environmental variables. > When I try to run the prediction I get the following warning message: > > Warning message: > In layerNames(x): the layerNames function is obsolete. Use "names" > instead. > > I have done some research on raster package updates and in the > summer they > added the function 'names' to replace 'layerNames'. I am wondering > if there > is a bug in the predict function that still relies on the layerNames > function? >Shouldn't this question _first_ be directed to the package authors?>-- David Winsemius, MD Alameda, CA, USA
On Nov 27, 2012, at 2:33 PM, megmurr wrote:> Hey, > > I am having troubles using the 'predict' function with in the Raster > package. I am using pm<-predict(mm, predictors) where mm is the > mahalanobis distance and the predictors are a stack of 6 raster layers > containing environmental variables. > When I try to run the prediction I get the following warning message: > > Warning message: > In layerNames(x): the layerNames function is obsolete. Use "names" > instead. > > I have done some research on raster package updates and in the > summer they > added the function 'names' to replace 'layerNames'. I am wondering > if there > is a bug in the predict function that still relies on the layerNames > function? >Shouldn't this question _first_ be directed to the package authors?>-- David Winsemius, MD Alameda, CA, USA
Hi, I am having the same problem. I am running MaxEnt and using the Raster package. But when i try to extract the BIL-file from one RasterLayer: str(pred at file@bandorder), and stack() this BIL-file with other environmental variables but get the same error.. ?In layerNames(x): the layerNames function is obsolete. Use "names" instead? -- View this message in context: http://r.789695.n4.nabble.com/Predict-function-in-Raster-package-tp4651027p4651092.html Sent from the R help mailing list archive at Nabble.com.
Thank you. Yes I have raised this question with the authors. -- View this message in context: http://r.789695.n4.nabble.com/Predict-function-in-Raster-package-tp4651027p4651143.html Sent from the R help mailing list archive at Nabble.com.
I recieved this response from the package authors: This warning comes from the dismo package (predict with Mahanalobis object). You can ignore it. It will go away with the next version of dismo (you can get it from R-Forge). So the problem is in dismo which has not been updated since raster has. Maxent is also run through dismo which is why you are having the same problem. They have not updated dismo yet but it appears that they are awear of the issue and will correct it whenever dismo is updated. -- View this message in context: http://r.789695.n4.nabble.com/Predict-function-in-Raster-package-tp4651027p4651205.html Sent from the R help mailing list archive at Nabble.com.