[R] Reading user input

Charilaos Skiadas skiadas at hanover.edu
Wed Apr 4 14:31:13 CEST 2007


I think the problem the OP may be having is that the code will not  
work if you put it in a document window in R and then tell R to  
"source the document". At least not with R.app in MacOSX. This is  
what happened when I did it:

 > source("/tmp/Rtmp0TQfA6/file10d63af1")
enter the number of groups: unlink("/tmp/Rtmp0TQfA6/file10d63af1")

Then the value of ANSWER is:

 > ANSWER
[1] "unlink(\"/tmp/Rtmp0TQfA6/file10d63af1\")"
 >

If instead you select the lines and select the "Execute" option, then  
it does the right thing. (These options appear under the Edit menu in  
R.app, don't know about other platforms).

On Apr 4, 2007, at 7:36 AM, jim holtman wrote:

> That is exactly what the code does.

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College



More information about the R-help mailing list