[R] rterm user command line input
Mikkel Grum
mikkel.grum at gmail.com
Mon Dec 7 07:41:49 CET 2009
In order to get user input when running a batch file with Rterm in
Windows XP and Windows Server 2003, I have been using the R script
below with R-2.8.1 and earlier. This opens a command line window with
the statement "Please enter the ID:" and feeds the users response into
the variable 'id'.
conout <- file('CONOUT$', 'w')
conin <- file('CONIN$', 'r')
cat('Please enter the ID: ', file = conout)
flush(conout)
id <- readLines(conin, 1)
flush(conin)
...
When I upgraded to R-2.10.0 it no longer worked. I cannot from the
NEWS files see what changed and much less what might work? Any ideas?
***************************
Mikkel Grum
+254 20 2345285
+254 720639599 (mobile)
mikkelgrum (Skype)
More information about the R-help
mailing list