Hi
you are right. From ?scan default value for imput value is double, so you
need to specify that it shall be character. I just showed possible
solution not a solution which can be used in all imaginable cases.
Regards
Petr
r-help-boun...@r-project.org napsal dne 07.08.2010 05:20:56:
> I'm ha
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, q
2 matches
Mail list logo