I've tried to run command in R 2.15.2
rsaga.geoprocessor(lib="ta_channels", module=0, param=list(ELEVATION="DEMflt.sgrd", CHNLNTWRK=paste("channels", i, ".sgrd", sep=""), CHNLROUTE="channel_route.sgrd", SHAPES="channels.shp", INIT_GRID="DEMflt.sgrd", DIV_CELLS=3, MINLEN=40), show.output.on.console=FALSE)
and I'm constantly getting this warning:
Warning message:
running command '"C:/Users/Nenad/Documents/R/win-library/2.15/RSAGA/SAGA-GIS/saga_cmd.exe" ta_preprocessor 2 -DEM "DEM1.sgrd" -RESULT "DEMflt.sgrd" -MINSLOPE "0.05"' had status 1
I use windows 8 and also tried to ran R as admin.
Any idea what is the problem? Thanks!
Running system
commands from R
can be really tricky. In my experience, as long as the exit code is not 127
then the command did run, and you could use the intern=TRUE
switch in the system
command for a more verbose output. If you run the command again, the warning message could contain a errmsg
attribute as well for some more info. hth
Idk how actual it is, but I've been struggling with " had status 1 " warning a lot. Especially it got really annoying when I tried to use seasonal
package to conduct the X13-ARIMA-SEATS
seasonal decomposition of time series. The seasonal::seas
command just doesn't work, because in the command there is a stop condition when running a certain stuff with cmd.exe returns non-zero status. While, as it was mentioned before, ' status 1 ' doesn't prevent command execution, in case of seasonal
package it does.
The problem in my case was caused by some mistake in Windows Registry (Win 10), that in turn caused warning System cannot find the path specified
when launching CMD.exe or PowerShell, which caused warning inside R
as well. So to fix it:
Win+R
-> regeditHKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Command Processor
folder clean the value of Autorun record (it should be empty)HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Command Processor
After these actions annoying warning with " has status 1 " has gone and seasonal::seas started to work perfectly. Hope it will be usefull for somebody.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.