[Rd] Unexplained strange behaviour of callNextMethod in S4 methods
Hello all. A few days ago, I submitted a problem which remains unsolved although somebody answered to my question. I still have the problem. Can someone please explain if something is wrong ? Have a look at this example: setGeneric(f,valueClass=NULL,def=function(x) standardGeneric(f)) setMethod(f,signature(x=A),def=function(x) { a = x...@a cat(nombre :,a,\n) } ) setMethod(f,signature(x=B),def=function(x) { cat(mot :,x...@b,\n) callNextMethod() } ) a = new(A,a=1) b = new(B,b=hello,a) f(a) f(b) This last command (f(b)) fails. But remove the 'valueClass=NULL' setting in setGeneric or add argument x to the call to callNextMethod and it will be OK! Isn't it tricky? Thanks in advance for any help. Harold -- * Harold PETITHOMME Equipe Données et Outils de Prévision (DPREVI/COMPAS/DOP) Météo France - Direction de la Production 42, avenue G. Coriolis. 31057 Toulouse Cedex France Tel : (33/0)5.61.07.82.85 Fax : (33/0)5.61.07.86.09 E-mail : harold.petitho...@meteo.fr __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 2.12.0 beta (r53110) fails make check on Ubuntu hardy
So your system has a broken BLAS and you need to use the builtin one. On Mon, 4 Oct 2010, it-r-de...@ml.epigenomics.com wrote: Hi! we observe a failing make check for reg-tests-1b.R with r53110 and since at least r53056 with the failing lines being [...] ## found from fallback test in slam 0.1-15 x - matrix(c(1, 0, NA, 1), 2, 2) y - matrix(c(1, 0, 0, 2, 1, 0), 3, 2) (z - tcrossprod(x, y)) [,1] [,2] [,3] [1,] NA NA0 [2,]210 stopifnot(identical(z, x %*% t(y))) Error: identical(z, x %*% t(y)) is not TRUE Execution halted In a fresh R session the results are x %*% t(y) [,1] [,2] [,3] [1,] NA NA NA [2,]210 (z - tcrossprod(x, y)) [,1] [,2] [,3] [1,] NA NA0 [2,]210 Regards, Matthias System: Ubuntu 8.05 hardy heron uname -a Linux bednorz 2.6.27.10-p4-server #1 SMP Fri Jan 9 10:03:30 CET 2009 i686 GNU/Linux gcc --version gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4) Complete log reg-tests-1b.Rout.fail attached. configure ares used: --prefix=/mnt/local/R/hardy/R-2.12.0-rc_101001r53110 --enable-R-profiling=yes --enable-R-shlib=yes --enable-BLAS-shlib=yes --with-blas=yes --with-lapack=no --with-readline=yes --with-tcltk=/usr/include/tcl8.4 --with-tcl-config=/usr/lib/tcl8.4/tclConfig.sh --with-tk-config=/usr/lib/tk8.4/tkConfig.sh --enable-shared=yes --enable-prebuilt-html --with-pic=yes --with-x=yes --with-cairo=yes --with-recommended-packages=yes --with-libpng=yes --with-jpeglib=yes --with-system-zlib=yes --with-system-bzlib=yes --with-system-pcre=no --with-valgrind-instrumentation=2 --enable-memory-profiling=yes configure output: R is now configured for i686-pc-linux-gnu Source directory: . Installation directory:/mnt/local/R/hardy/R-2.12.0-rc_101001r53110 C compiler:/usr/bin/gcc-4.2 -std=gnu99 -g -O2 Fortran 77 compiler: /usr/bin/gfortran-4.2 -g -O2 C++ compiler: /usr/bin/g++-4.2 -g -O2 Fortran 90/95 compiler:/usr/bin/gfortran-4.2 -g -O2 Obj-C compiler: /usr/bin/gcc-4.2 -g -O2 Interfaces supported: X11, tcltk External libraries:readline, BLAS(generic), ICU Additional capabilities: PNG, JPEG, TIFF, NLS, cairo Options enabled: shared R library, shared BLAS, R profiling, memory profiling, Java, static HTML Recommended packages: yes -- Matthias BurgerProject Manager, Assay Transfer Epigenomics AG Kleine Praesidentenstr. 1 10178 Berlin, Germany phone:+49-30-24345-0 fax:+49-30-24345-555 http://www.epigenomics.com matthias.bur...@epigenomics.com -- Epigenomics AG Berlin Amtsgericht Charlottenburg HRB 75861 Vorstand: Geert Nygaard (CEO/Vorsitzender) Oliver Schacht PhD (CFO) Aufsichtsrat: Prof. Dr. Dr. hc. Rolf Krebs (Chairman/Vorsitzender) -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] tabulate() does not check for input bounds
Dear Olaf, thanks for your reply, at first sight I did not link this behaviour to that subsetting feature that I must admit I am not used to. Ciao Simone On Mon, Oct 4, 2010 at 1:13 AM, Olaf Mersmann ol...@statistik.tu-dortmund.de wrote: Dear Simone, On 04.10.2010, at 01:01, Simone Giannerini wrote: it looks like that tabulate() does not check for the bounds of the input. Reproducible example: b - 1:2 tabulate(b[1:100]) [1] 1 1 this looks perfectly reasonable. Consider the result of b - 1:2 b[1:100] [1] 1 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [26] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [51] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA [76] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA and check the help page for tabulate (esp. the na.rm argument). What was your expected result? Cheers, Olaf -- __ Simone Giannerini Dipartimento di Scienze Statistiche Paolo Fortunati Universita' di Bologna Via delle belle arti 41 - 40126 Bologna, ITALY Tel: +39 051 2098262 Fax: +39 051 232153 http://www2.stat.unibo.it/giannerini/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] S4 class help pages [Sec=Unclassified]
On 04/10/2010 12:14 AM, Troy Robertson wrote: Hi, I am working on producing an R package containing mostly S4 classes and methods. I have generated and filled out all the necessary .Rd files but find that once installed I am unable to access help pages for the classes using the ?package::classname-class syntax that is suggested when using the ?? apropos search. This lists my package classes and the class help pages. Instead, the Arithmetic Operators help page is always loaded. I can load the pages I want via links like \linkS4class{classname} in my package help page. I have played with a couple of other packages and see the same problem. Is there a different syntax to access these S4 class help pages rather than ?package::classname-class? The problem is the parsing: that is parsed as `?`(stats4::mle - class), i.e. there's a subtraction there, not a name with a hyphen in it. So you're seeing help on subtraction. You can get what you want with class?stats4::mle. I'll see if I can fix the advice from ??. Duncan Murdoch Thanks Troy ___ Australian Antarctic Division - Commonwealth of Australia IMPORTANT: This transmission is intended for the addressee only. If you are not the intended recipient, you are notified that use or dissemination of this communication is strictly prohibited by Commonwealth law. If you have received this transmission in error, please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and DELETE the message. Visit our web site at http://www.antarctica.gov.au/ ___ [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 2.12.0 beta (r53110) fails make check on Ubuntu hardy
Thanks for the quick answer. We will use the builtin BLAS then. Matthias Prof Brian Ripley wrote, On 10/04/10 15:17: So your system has a broken BLAS and you need to use the builtin one. On Mon, 4 Oct 2010, it-r-de...@ml.epigenomics.com wrote: Hi! [...] -- Matthias BurgerProject Manager, Assay Transfer Epigenomics AG Kleine Praesidentenstr. 1 10178 Berlin, Germany phone:+49-30-24345-0 fax:+49-30-24345-555 http://www.epigenomics.com matthias.bur...@epigenomics.com -- Epigenomics AG Berlin Amtsgericht Charlottenburg HRB 75861 Vorstand: Geert Nygaard (CEO/Vorsitzender) Oliver Schacht PhD (CFO) Aufsichtsrat: Prof. Dr. Dr. hc. Rolf Krebs (Chairman/Vorsitzender) __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] S4 class help pages [Sec=Unclassified]
-Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Monday, 4 October 2010 11:09 PM To: Troy Robertson Cc: 'r-devel@R-project.org' Subject: Re: [Rd] S4 class help pages [Sec=Unclassified] On 04/10/2010 12:14 AM, Troy Robertson wrote: Hi, I am working on producing an R package containing mostly S4 classes and methods. I have generated and filled out all the necessary .Rd files but find that once installed I am unable to access help pages for the classes using the ?package::classname-class syntax that is suggested when using the ?? apropos search. This lists my package classes and the class help pages. Instead, the Arithmetic Operators help page is always loaded. I can load the pages I want via links like \linkS4class{classname} in my package help page. I have played with a couple of other packages and see the same problem. Is there a different syntax to access these S4 class help pages rather than ?package::classname-class? The problem is the parsing: that is parsed as `?`(stats4::mle - class), i.e. there's a subtraction there, not a name with a hyphen in it. So you're seeing help on subtraction. You can get what you want with class?stats4::mle. I'll see if I can fix the advice from ??. Duncan Murdoch Thanks Troy Cheers Duncan, Both your suggestions do the trick. i.e. class?stats4::mle and ?stats4::`mle-class` Troy ___ Australian Antarctic Division - Commonwealth of Australia IMPORTANT: This transmission is intended for the addressee only. If you are not the intended recipient, you are notified that use or dissemination of this communication is strictly prohibited by Commonwealth law. If you have received this transmission in error, please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and DELETE the message. Visit our web site at http://www.antarctica.gov.au/ ___ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Recursion error after upgrade to R_2.11.1 [Sec=Unclassified]
Resending this in plain text, after realising the html text hadn't been posted (oops). Hi all, After an upgrade from R_2.10.1 to R_2.11.1 I am now getting the following error: Error: evaluation nested too deeply: infinite recursion / options(expressions=)? This occurs in the initialize method of S4 classes where I was initialising attributes eg: .Object[['realtimeState']] - list() I can mostly avoid this new error by altering the code to do: .Object$realtimeState - list() OR .obj...@.xdata$realtimestate - list() But there are also times when I need to do .Object[realtimeState] - list(NULL) in order to specifically set it to NULL (rather than have it removed) which I think is also causing me grief. My classes all extend .environment and store all non-static data as per above (in environment .xData slot) rather than in normal class slots because I am able to achieve much quicker execution times without all the copy-on-change cost that results from passing these objects containing large amounts of slot-based data. Can anyone provide a reason for the changes that have brought about the recursion issue? Is there a better way to achieve the pass-by-reference style objects I am after? Thanks Troy ___ Australian Antarctic Division - Commonwealth of Australia IMPORTANT: This transmission is intended for the addressee only. If you are not the intended recipient, you are notified that use or dissemination of this communication is strictly prohibited by Commonwealth law. If you have received this transmission in error, please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and DELETE the message. Visit our web site at http://www.antarctica.gov.au/ ___ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Fwd: Hello
-- Forwarded message -- From: ³Âº·æ wuk...@gmail.com Date: 2010/10/5 Subject: Hello To: gso...@googlegroups.com I am very interesting about R. Dose it have IRC channels? If yes, please tell me how to access it. Thanks. HF [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel