[R] Rscript hangs on exit with ubuntu 11.04

Dirk Eddelbuettel edd at debian.org
Tue May 17 13:50:09 CEST 2011


On 17 May 2011 at 12:18, Mikael Högqvist wrote:
| Hi,
| 
| I have run into a strange issue with Rscript and plyr. When running
| the following Rscript:
| 
| #!/usr/bin/Rscript
| library(plyr)
| d = ddply(data.frame(a=1:101,b=1:101), .(a,b), nrow)
| head(d)
| 
| the script does not terminate. It prints out the results from head(d),
| but does not return to the shell. By changing the a and b to 1:100,
| the script returns. The same code running within the R shell works
| fine. I'm using plyr 1.5.2 and R 2.13.0 on Ubuntu 11.04. The same code
| worked fine on Ubuntu 10.10.
| 
| I've found an older mail to the r-help mailing-list which may be related:
| 
| https://stat.ethz.ch/pipermail/r-help/2011-March/273163.html
| 
| but there was no solution. I also asked this question on the plyr mailing list.
| 
| Can anyone else reproduce this or have any idea of how it can be resolved?

I cannot replicate this on Ubuntu 11.04:

edd at max:~$ Rscript /tmp/mikael.r 
  a b V1
1 1 1  1
2 2 2  1
3 3 3  1
4 4 4  1
5 5 5  1
6 6 6  1
edd at max:~$ r -p /tmp/mikael.r      # apt-get install littler
  a b V1
1 1 1  1
2 2 2  1
3 3 3  1
4 4 4  1
5 5 5  1
6 6 6  1
edd at max:~$ cat /tmp/mikael.r 
#!/usr/bin/Rscript
library(plyr)
d = ddply(data.frame(a=1:101,b=1:101), .(a,b), nrow)
head(d)
edd at max:~$ 


Try maybe with your .RData file or whatever else may have side-effects.

Dirk

-- 
Gauss once played himself in a zero-sum game and won $50.
                      -- #11 at http://www.gaussfacts.com



More information about the R-help mailing list