Hi,

I am very new to R and I am trying to write KML files. I am running R-2.13.1 and I have the following packages:

-          AKIMA

-          RGDAL

-          RSAGA

-          SP


I was trying to run the simple example that I found at the following web page:
http://spatial-analyst.net/wiki/index.php?title=Export_maps_to_GE

The lines that I can run are:

data(meuse.grid)
coordinates(meuse.grid) <- ~x+y
gridded(meuse.grid) <- TRUE
proj4string(meuse.grid) = CRS("+init=epsg:28992")
# raster to polygon conversion;
writeGDAL(meuse.grid["soil"], "meuse_soil.sdat", "SAGA", mvFlag=-99999)
rsaga.geoprocessor(lib="shapes_grid", module=6,
                       param=list(GRID="meuse_soil.sgrd", POLYGONS="meuse_soil.shp", CLASS_ALL=1))

and it crashes there with the following error message:

Error in setwd(env$workspace) : character argument expected
In addition: Warning message:
In rsaga.env() :
  SAGA command line program 'saga_cmd.exe' not found in any of the paths
C:/Program Files/R/R-2.13.1/library/RSAGA/saga_vc
C:/Program Files/R/R-2.13.1/library/RSAGA/SAGA-GIS
...

Can someone please let me know what I should do to fix that error?

Thanks,
Mel


	[[alternative HTML version deleted]]

