[R] 'scan' in a script?

yofiffy brian.a.mack at gmail.com
Thu Nov 15 19:06:00 CET 2012


It looks like you are trying to use the scan function to pause some script
being called with the source function until you provide user input.

To do this, you need to specify the argument file="stdin" when scan runs
inside a process.  EG scan(file='stdin', nmax=1).  In my Linux terminal, at
least, (using 2.15) I lose the prompt (which formerly defaulted to '1:') and
have to enter some arbitrary value like '1' (whereas hitting enter with no
value entered counted as input when running from an interactive session).




--
View this message in context: http://r.789695.n4.nabble.com/scan-in-a-script-tp898837p4649634.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list