[ADMB Users] running admb from R using system()

Benedikt Gehr benedikt.gehr at ieu.uzh.ch
Mon May 31 01:44:04 PDT 2010


Hi

I'm trying to run an admb model from R by using the system () command.
The admb model runs fine when running it from the admb command line or
when using emacs. However when I try it with system() then R crashes
every time.
And I tried using the R command line and RGui and in both it crashes. I
also tried it from different computers.

What I do is I first set the directory where I keep the admb template
file with the corresponding admb data file and then invoke the system
command either step by step or directly. I can build the model but when
executing the model.exe file R crashes.

##########################
#setting the working directory
setwd("Documents and Settings\\Beni User\\Desktop\\Transfer\\Model
Fournier\\admb models\\simulated data\\stochastic\\pooled age classes")

#building the model -> this works fine
system('makeadm stocpool')

#running the model -> makes R crash
system('stoc.exe')
###########################
#or directly like this:
setwd("Documents and Settings\\Beni User\\Desktop\\Transfer\\Model
Fournier\\admb models\\simulated data\\stochastic\\pooled age classes")
system("./stocpool") -> makes R crash right away


Does anyone know why this happens and how I can make this work?

Thanks a lot for the help!!

cheers

Beni








More information about the Users mailing list