Hello,

I am trying to use the recently updated function "predict" from the package
raster. I would like to use the field "const", as one of my variable is
categorial.
I have an error message but I can't find where is the problem.

Error message : Erreur dans `[.data.frame`(blockvals, , f[i]) : undefined
columns selected

code : Pred_fac <- predict(rasStack, model=model_fac, predict=predict.glm,
progress='text', const=factorDF)

rasStack is a RasterStack and contains only one layer with one explicative
variable. the layer name is the same as in the model.
factorDF is a data.frame and contains only one column with one explicative
variable. the column name is the same as in the model.

the dimensions are the same : the number of rows in the data frame
correspond to the number of cells in the raster.

Does someone succeed to use this function with the new field "const" ?

Thanks for help,

Cheers,

Isabelle.

-- 
Isabelle Boulangeat, PhD student
Ecosystem dynamics and plant traits

Bureau 203, +33 (0) 476 635 733

Laboratoire d'écologie Alpine (LECA)
Grenoble, France
lab' s website : http://www-leca.ujf-grenoble.fr/
my website : http://j.boulangeat.free.fr/

	[[alternative HTML version deleted]]

