Hi Everybody
I need to export the result of randomforest classification. The R object is
a SpatialPixelsDataFrame and the predictions are soil classes (categorical
colunm).
I like to export to SAGAGIS, and I was trying with "writeGDAL", but the
response is:

> class(grid_cls)[1] "SpatialPixelsDataFrame"
attr(,"package")
[1] "sp"> names(grid_cls) [1] "ID"          "ascii.mde30"
"Flow.Direct" "Watershed.B" "Analytical"  "Slope"       "Aspect"
 [8] "Plan.Curvat" "Profile.Cur" "Convergence" "Catchment.A"
"Topographic" "LS.Factor"   "Channel.Net"
[15] "Vertical.Di" "Relative.Sl" "prediction"   >
grid_cls$prediction[1:15] [1] GSJ GSJ GSJ GSJ GSJ GSJ GSJ GSJ GSJ GSJ
GSJ GSJ GSJ GSJ GSJ
Levels: CX GM GSJ GX LA LVA PA PVA RL RY> writeGDAL(grid_cls[,17],
"Soil_Class.sdat", drivername="SAGA", mvFlag=-99999)Error in
create2GDAL(dataset = dataset, drivername = drivername, type = type,
:
  Numeric bands required


The error is that the grid (grid_cl[,17]) is a categorical
spatialpixelsdataframe? How can I export this result to SAGAGIS?

Thanks for any help.

-- 
________________________
Waldir de Carvalho Junior
Pedologia
Pesquisador
Embrapa Solos

	[[alternative HTML version deleted]]

