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@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@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@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@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 ______________________________________________ R-help@r-project.org 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.