Skip to content

glmmADMB troubles

4 messages · Ben Bolker, Ross Boylan

#
On 13-02-28 01:15 PM, Ross Boylan wrote:
[snip]
Yes. I might be able to fix the NA-handling, but given that I am
fairly sure that this error means an NA problem, I have taken the lazy
way out and advised the user that this means they have to deal with NAs
themselves.
[snip: not including version without NAs removed, since we already
know what the issue is there]
I'm a little bit baffled here.  What happens if you use save.dir to
save the input files to a temporary directory and run

"c:/Users/rdboylan/Documents/R/R-2.15.2/site-library/glmmADMB/bin/windows32/glmmadmb.exe"
-maxfn 500 -maxph 5 -noinit -shess

from the command line?

 What is the result of .Platform (and .Platform$OS in particular)

 It looks conceivably like R is misdiagnosing your system as *not* being
windows, as that's the only way system() should be running.  Are you
running under Cygwin (you say it's installed below) ...  ?
lme4 should be installable from lme4.r-forge.r-project.org/repos now,
as stated in a message earlier today.
1 day later
#
On Sat, 2013-03-02 at 18:04 -0500, Ben Bolker wrote:
I'll try when I'm at the machine (later in the week).
I am not running under cygwin, at least not knowingly.

I may have set up emacs to try to use cygwin; maybe that leaked into R
running under ESS.  My emacs is the Windows version.

I took the "C:/Program" reference to mean that it was trying to execute
"C:/Program Files/...." but couldn't deal with the space.  If it's
trying to execute glmmadb.exe then the problem is that it has looked up
a system path while the program (R and packages) is installed at the
user level.

Ross
3 days later
#
On 3/2/2013 3:04 PM, Ben Bolker wrote:
platform: windows 32
executable name: glmmadmb.exe
bin_loc: c:/Users/rdboylan/Documents/R/R-2.15.2/site-library/glmmADMB/bin/windows32/glmmadmb.exe
changed working directory to I:/LAMOC/Ross
Command line: "c:/Users/rdboylan/Documents/R/R-2.15.2/site-library/glmmADMB/bin/windows32/glmmadmb.exe" -maxfn 500 -maxph 5 -noinit -shess
Error in system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait,  :
   'C:/Program' not found

Then from a Windows Command Prompt (not cygwin)
H:\> "c:/Users/rdboylan/Documents/R/R-2.15.2/site-library/glmmADMB/bin/windows32
/glmmadmb.exe" -maxfn 500 -maxph 5 -noinit -shess
Error trying to open data input file glmmadmb.dat
  Error trying to read in model data
  This is usual caused by a missing DAT file
H:\>I:

I:\>cd LAMOC/Ross

I:\LAMOC\Ross> "c:/Users/rdboylan/Documents/R/R-2.15.2/site-library/glmmADMB/b
/windows32/glmmadmb.exe" -maxfn 500 -maxph 5 -noinit -shess

Initial statistics: 1 variables; iteration 0; function evaluation 0; phase 1
Function value   8.9003579e+04; maximum gradient component mag  -5.3609e+02
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

   1  0.00000 -5.36095e+02 |

  - final statistics:
1 variables; iteration 8; function evaluation 14
Function value   5.0576e+04; maximum gradient component mag   6.2393e-08
Exit code = 1;  converg criter   1.0000e-04
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient

   1 112.5711  6.23928e-08 |
etc

So it seems to work, provided I start in the save.dir. Note that is the 
directory that R is running in.
glmmadmb.exe is still running as I hit send.
$OS.type
[1] "windows"

$file.sep
[1] "/"

$dynlib.ext
[1] ".dll"

$GUI
[1] "RTerm"

$endian
[1] "little"

$pkgType
[1] "win.binary"

$path.sep
[1] ";"

$r_arch
[1] "i386"

Ross
21 days later
#
I stepped through the code and think I found the problem.  Since I'm 
running under emacs/ESS the value of the environment variable SHELL is 
funny:

[context: run_bin does think it's in windows and invokes
  shell(cmd, invisible = TRUE, intern = !verbose)]

The relevant branch of shell() is (note it uses shell as a variable 
inside the function)
     if (missing(shell)) {
         shell <- Sys.getenv("R_SHELL")
         if (!nzchar(shell))
             shell <- Sys.getenv("SHELL")
         if (!nzchar(shell))
             shell <- Sys.getenv("COMSPEC")
R_SHELL is empty
SHELL is  "C:/Program Files/GNU Emacs 24.2/bin/cmdproxy.exe"
I believe that is where the "C:/Program" was coming from in the error 
messages.
COMSPEC is  "C:\\Windows\\system32\\cmd.exe".

I set R_SHELL to the value of COMSPEC and now the command runs.

Ross

P.S. shell() in trun invokes system(), which is why you were seeing it 
in the traceback.
On 3/6/2013 6:37 PM, Ross Boylan wrote: