Antje wrote: > Hello, > > I also have problems to get to run the following lines. If I run the > block instead of every single line, it simply does not wait for the input. > Can anybody help me? > > ------------------------ > pos_name <- readline("Please type: ") > > r <- substr(pos_name, 1,1) > c <- substr(pos_name, 2,nchar(pos_name)) > > ------------------------ > Hi Antje, What you seem to be doing is pasting the lines into the R window. The second line looks like the input line that the first line is expecting, and if you remove the empty line, you will see that pos_name has been assigned the text of the second line.
If you put these lines into a text file and then use "source" to read it, it works as I think you expect. Jim ______________________________________________ R-help@stat.math.ethz.ch 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.