[R] Prompt with scan()
Ben Bolker
ben at zoo.ufl.edu
Thu Sep 6 04:01:58 CEST 2001
Do you mean readline()?
readline has a 32-character limit, which you can get around as follows:
myreadline <- function(prompt="") {
cat(prompt)
readLines(n=1)
}
On Wed, 5 Sep 2001 john.janmaat at acadiau.ca wrote:
> Hello,
>
> I am using R to teach an undergraduate course in
> Econometrics. For class demonstration purposes, I plan
> to prepare my scripts and be able to step through them.
> I noticed that the built-in demo prompts for an enter
> with what looks like the scan() function, but replaces
> the n: prompt with different text. The on-line
> documention does not make it clear to me how to do
> this. Suggestions?
>
> Thanks,
>
> John.
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
318 Carr Hall bolker at zoo.ufl.edu
Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker
Box 118525 (ph) 352-392-5697
Gainesville, FL 32611-8525 (fax) 352-392-3704
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list