[R] Starting NONMEM (nmfe6) from R

Michal Figurski
Wed, 05 Aug 2009 15:24:53 -0000

Hello,

I have made an R script that prepares a NONMEM dataset and I would like
to start the NONMEM run right after the dataset is ready.

I am using windows XP, R 2.9.1 and NONMEM 6.

I have prepared a run.bat file that looks like this:
----------------------------------------
call K:\nmvi\NMdirectories.bat

call K:\nmvi\nmfe6 "path\control.txt" "path\output.txt"
----------------------------------------

The first call sets up all paths and directories, the second call starts
NONMEM. If I run this run.bat file directly in cmd window, it runs
correctly. However, if I use the R command:
    shell("K:\\path\\run.bat", wait=T)
the first call runs correctly, but then the second produces and error
"The system cannot find the path specified." - completely as if the
computer has forgotten all the paths and settings from the first call.

Does anyone know a solution to this problem?

--
Michal J. Figurski, PhD
HUP, Pathology & Laboratory Medicine
Biomarker Research Laboratory
3400 Spruce St. 7 Maloney
Philadelphia, PA 19104
tel. (215) 662-3413