I want to create a topographic wetness index (TWI) in R and I am trying to set an environment according to the help of RSAGA-package but I am always facing with an error appears in a different term.
my code is as follows:
library("RSAGA") library("envirem") myenv <- rsaga.env() myenv <- rsaga.env(workspace = ".",path ="C:/OSGeo4W64/apps/saga-ltr" ,modules ="C:/OSGeo4W64/apps/saga-ltr/modules" ) rsaga.hillshade("dem1","hillshade205",env=myenv) top<-topoWetnessIndex(dem1, myenv)
Error in .getGDALtransient(x, filename = filename, options = options, : filename exists; use overwrite=TRUE