I'm having problems with your method Petr. I seem to get an additional prompt.
Example... f <- function() { cat("\n", "Enter a string:", "\n") s <- scan(n=1) cat("\n", "You entered", s, "\n") } Running f() produces... Enter a string: 1: blah 1: Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : scan() expected 'a real', got 'blah' > Changing the code to scan(n=1, what="character") Fixes the problem but your post implies that this is not necessary. Could it be GUI specific ? I am running R 2.11.1 with the Mac OSX GUI 1.34 Leopard build 64-bit (5589) Michael ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.