[R] R crash on Mac

Adelchi Azzalini aa at manerin.stat.unipd.it
Fri Feb 27 17:07:59 CET 2009

If I define this function

R> ask <-  function (message = "Type in datum") 
               eval(parse(prompt = paste(message, ": ", sep = "")))

the following is produced as expected on a Linux/debian machine

R> ask("input")
input: 3
[1] 3
R> ask("input")
input: 3:6
[1] 3 4 5 6
R> ask("input")
input: c(3,6)
[1] 3 6

If I run exactly the same on a Mac (OS X 10.5.6), it still works 
provided R is run in a Terminal window. 

The outcome changes if R is run in "its own window", started by clicking 
on its icon; the first two examples are still Ok, the third one produces:

 *** caught segfault ***
 address 0x4628c854, cause 'memory not mapped'

R> sessionInfo()  # before crash!
R version 2.8.1 (2008-12-22) 


attached base packages:
[1] stats     utils     datasets  grDevices graphics  methods   base
R> R.version
	       platform       i386-apple-darwin8.11.1     
	       arch           i386                        
	       os             darwin8.11.1                
	       system         i386, darwin8.11.1          
	       major          2                           
	       minor          8.1                         
	       year           2008                        
	       month          12                          
	       day            22                          
	       svn rev        47281                       
	       language       R                           
	       version.string R version 2.8.1 (2008-12-22)

Adelchi Azzalini  <azzalini at stat.unipd.it>
Dipart.Scienze Statistiche, Università di Padova, Italia
tel. +39 049 8274147,  http://azzalini.stat.unipd.it/

More information about the R-help mailing list