Re: [Rd] Documentation bug (PR#7483)
On Sat, 8 Jan 2005 21:37:09 + (GMT), Prof Brian Ripley (PBR) wrote: http://cran.r-project.org is not part of R per se and has its own b= ug=20 reporting address, [EMAIL PROTECTED] That file was made with makeinfo 4.6, and it is a bug in that versi= on of=20 makeinfo. It is not a problem in the version distributed with R for Windows, = for=20 example, made with the current makeinfo 4.7. Thanks for the bug report, has been fixed. Best, --=20 --- Friedrich Leisch=20 Institut f=FCr Statistik Tel: (+43 1) 58801 10715 Technische Universit=E4t WienFax: (+43 1) 58801 10798 Wiedner Hauptstra=DFe 8-10/1071 A-1040 Wien, Austria http://www.ci.tuwien.ac.at/~leisch __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Problem with compiling - Freebsd on AMD64 (PR#7489)
Full_Name: Kelly Black Version: 2.0.1 OS: FreeBSD 5.3 on AMD64 Submission from: (NULL) (149.106.32.93) I downloaded R-2.0.1 from the R website, ran configure then make and got an error. I will paste a copy of the output from the makefile below. The problem was when the makefile tried to run the R binary. When I came across the error I reran configure, but this time with the following arguments: ./configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g This time when I ran make it compiled with no problems. I tried the same thing again only with all of the flags set to -O and again it compiled with no problems. When I ran it with the flags set to -g -O2 it had the same error. A copy of the output from gdb can be found at http://blackk.union.edu/~black/freebsd/R-error.txt, but the output isn't very helpful. The system used is a laptop, Compaq Presario (amd64), under FreeBSD 5.3 compiled for the amd64 architecture. Output from make with flags -O2 [EMAIL PROTECTED] pwd /tmp/R-2.0.1/src/library/base [EMAIL PROTECTED] make echo building package 'base' building package 'base' /usr/local/bin/bash ../../../src/scripts/mkinstalldirs ../../../library/base/R (f=${TMPDIR:-/tmp}/R$$; cat `LC_COLLATE=C ls ./R/*.R ./R/unix/*.R` ${f}; /usr/local/bin/bash ../../../tools/move-if-change ${f} all.R) all.R is unchanged /usr/local/bin/bash ../../../tools/copy-if-change all.R ../../../library/base/R/base ${f} ../../../library/base/R/base is unchanged for f in COPYRIGHTS INDEX SOURCES; do if test -f ./${f}; then /usr/bin/install -c -m 644 ./${f} ../../../library/base; fi; done if test -f DESCRIPTION; then /usr/bin/install -c -m 644 DESCRIPTION ../../../library/base; (tmp=Built: R 2.0.1; ; if test -d ./src; then tmp=${tmp}x86_64-unknown-freebsd5.3; fi; tmp=${tmp}; `date`; unix; echo ${tmp}) ../../../library/base/DESCRIPTION; fi /usr/local/bin/bash ../../../src/scripts/mkinstalldirs ../../../library/base/demo for f in `ls -d ./demo/* | sed -e '/CVS/d' -e '/00Index/d'`; do /usr/bin/install -c -m 644 ${f} ../../../library/base/demo; done /usr/local/bin/bash ../../../src/scripts/mkinstalldirs ../../../library/base/man (f=${TMPDIR:-/tmp}/R$$; for rdfile in ./man/*.Rd ./man/unix/*.Rd; do echo % --- Source file: ${rdfile} ---; cat ${rdfile}; echo '\eof'; done ${f}; /usr/local/bin/bash ../../../tools/move-if-change ${f} ../../../library/base/man/base.Rd) rm -f ../../../library/base/man/base.Rd.gz /usr/bin/gzip ../../../library/base/man/base.Rd /usr/bin/install -c -m 644 ./inst/CITATION ../../../library/base /usr/bin/install -c -m 644 all.R ../../../library/base/R/base cat ./makebasedb.R | R_DEFAULT_PACKAGES=NULL LC_COLLATE=C ../../../bin/R --vanilla --slave /dev/null Floating point exception (core dumped) *** Error code 136 Stop in /tmp/R-2.0.1/src/library/base. __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Problem with compiling - Freebsd on AMD64 (PR#7489)
In what sense is this a bug in R? If changing your compiler optimization leads to a segfault, it looks very like a compiler bug. So what was the compiler? [R does work using AMD64 on Linux, but only correctly with gcc = 3.3.3.] BTW gdb output with -g -O2 (the R default) ought to be informative, so was this with -O? On Mon, 10 Jan 2005 [EMAIL PROTECTED] wrote: Full_Name: Kelly Black Version: 2.0.1 OS: FreeBSD 5.3 on AMD64 Submission from: (NULL) (149.106.32.93) I downloaded R-2.0.1 from the R website, ran configure then make and got an error. I will paste a copy of the output from the makefile below. The problem was when the makefile tried to run the R binary. When I came across the error I reran configure, but this time with the following arguments: ./configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g This time when I ran make it compiled with no problems. I tried the same thing again only with all of the flags set to -O and again it compiled with no problems. When I ran it with the flags set to -g -O2 it had the same error. A copy of the output from gdb can be found at http://blackk.union.edu/~black/freebsd/R-error.txt, but the output isn't very helpful. The system used is a laptop, Compaq Presario (amd64), under FreeBSD 5.3 compiled for the amd64 architecture. Output from make with flags -O2 [EMAIL PROTECTED] pwd /tmp/R-2.0.1/src/library/base [EMAIL PROTECTED] make echo building package 'base' building package 'base' /usr/local/bin/bash ../../../src/scripts/mkinstalldirs ../../../library/base/R (f=${TMPDIR:-/tmp}/R$$; cat `LC_COLLATE=C ls ./R/*.R ./R/unix/*.R` ${f}; /usr/local/bin/bash ../../../tools/move-if-change ${f} all.R) all.R is unchanged /usr/local/bin/bash ../../../tools/copy-if-change all.R ../../../library/base/R/base ${f} ../../../library/base/R/base is unchanged for f in COPYRIGHTS INDEX SOURCES; do if test -f ./${f}; then /usr/bin/install -c -m 644 ./${f} ../../../library/base; fi; done if test -f DESCRIPTION; then /usr/bin/install -c -m 644 DESCRIPTION ../../../library/base; (tmp=Built: R 2.0.1; ; if test -d ./src; then tmp=${tmp}x86_64-unknown-freebsd5.3; fi; tmp=${tmp}; `date`; unix; echo ${tmp}) ../../../library/base/DESCRIPTION; fi /usr/local/bin/bash ../../../src/scripts/mkinstalldirs ../../../library/base/demo for f in `ls -d ./demo/* | sed -e '/CVS/d' -e '/00Index/d'`; do /usr/bin/install -c -m 644 ${f} ../../../library/base/demo; done /usr/local/bin/bash ../../../src/scripts/mkinstalldirs ../../../library/base/man (f=${TMPDIR:-/tmp}/R$$; for rdfile in ./man/*.Rd ./man/unix/*.Rd; do echo % --- Source file: ${rdfile} ---; cat ${rdfile}; echo '\eof'; done ${f}; /usr/local/bin/bash ../../../tools/move-if-change ${f} ../../../library/base/man/base.Rd) rm -f ../../../library/base/man/base.Rd.gz /usr/bin/gzip ../../../library/base/man/base.Rd /usr/bin/install -c -m 644 ./inst/CITATION ../../../library/base /usr/bin/install -c -m 644 all.R ../../../library/base/R/base cat ./makebasedb.R | R_DEFAULT_PACKAGES=NULL LC_COLLATE=C ../../../bin/R --vanilla --slave /dev/null Floating point exception (core dumped) *** Error code 136 Stop in /tmp/R-2.0.1/src/library/base. __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Brian D. Ripley, [EMAIL PROTECTED] 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@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Problem with compiling - Freebsd on AMD64 (PR#7489)
[EMAIL PROTECTED] writes: Full_Name: Kelly Black Version: 2.0.1 OS: FreeBSD 5.3 on AMD64 Submission from: (NULL) (149.106.32.93) I downloaded R-2.0.1 from the R website, ran configure then make and got an error. I will paste a copy of the output from the makefile below. The problem was when the makefile tried to run the R binary. When I came across the error I reran configure, but this time with the following arguments: ./configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g This time when I ran make it compiled with no problems. I tried the same thing again only with all of the flags set to -O and again it compiled with no problems. When I ran it with the flags set to -g -O2 it had the same error. A copy of the output from gdb can be found at http://blackk.union.edu/~black/freebsd/R-error.txt, but the output isn't very helpful. Indeed... This sounds like a compiler error, so information about the GCC version used is crucial. Switching compilers or running with less than optimal optimization is your best chance, unless you can pinpoint exactly what is getting miscompiled so that a workaround can be found. -- O__ Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Windows build hiatus
There have been a lot of changes recently in R-devel, so I've been uploading frequent Windows builds to CRAN. I'm heading out to a conference this week, so it's unlikely there will be any more builds until Jan 18 or later. (I've just done one today; it may not show up until tomorrow). If you were unaware of these builds, they are available at your favourite CRAN mirror (list here: http://cran.r-project.org/mirrors.html) in the bin/windows/base directory. Follow the link to the r-devel release or the r-patched release. Duncan Murdoch __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
RE: [Rd] new(call) problem (PR#7490)
I have found a solution to the new(call) problem that I believe produces the correct behavior for the default call object, and am also reclassifying this as a bug, as I believe the current behavior to be incorrect. Recap, the following error occurs: new(call) Error in print(undef()) : couldn't find function undef It looks like the problem is that the default object for new(call) is the function undef(), which does not exist. So, the show() and print() methods correspondingly fail. If I initialize the undef() function at the beginning of my code to an empty function: undef - new(function) then new(call) will then reference an existing (yet empty) object that is coerced into a call, and the show and print methods correctly display this object as NULL. Furthermore, I am able to extend this empty call object to other S4 objects without trouble. Now: undef - new(function) new(call) NULL str(new(call)) Formal class 'call' [package methods] with 0 slots list() This, I believe is the preferred behavior of new(call), and I would contend this fix should be included in the R source. Best, Robert -Original Message- From: McGehee, Robert [mailto:[EMAIL PROTECTED] Sent: Saturday, January 08, 2005 6:06 PM To: r-devel@stat.math.ethz.ch Subject: [Rd] new(call) problem The below looks like the show method has trouble with the default call object (or that there is no default call object). Not sure if this is a bug, design problem, or a difficulty on my part using and extending the call class, but it has caused difficulty for when I want to extend the call class into other S4 classes. new(call) Error in print(undef()) : couldn't find function undef This error pops up when I show an object with an empty call slot. Error in show(undef()) : Unable to find the argument object in selecting a method for function show I'll leave it up to the developers to designate this as a bug or not, but I would certainly prefer that new() and show() never reports errors when an empty object is passed as an argument (of any class). Best, Robert Robert McGehee Geode Capital Management, LLC 53 State Street, 5th Floor | Boston, MA | 02109 Tel: 617/392-8396Fax:617/476-6389 mailto:[EMAIL PROTECTED] This e-mail, and any attachments hereto, are intended for use by the addressee(s) only and may contain information that is (i) confidential information of Geode Capital Management, LLC and/or its affiliates, and/or (ii) proprietary information of Geode Capital Management, LLC and/or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify me by telephone (you may call collect), or by e-mail, and please permanently delete the original, any print outs and any copies of the foregoing. Any dissemination, distribution or copying of this e-mail is strictly prohibited. __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] is there String concating function in R?
Hi Saurin, Firstly you should post this question to R-help and not in R-devel since the purpose of the latter is different. Regarding your question take a look at ?paste paste(A, B, sep=) Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/16/336899 Fax: +32/16/337015 Web: http://www.med.kuleuven.ac.be/biostat http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm - Original Message - From: Saurin Jani [EMAIL PROTECTED] To: Rproject development r-devel@stat.math.ethz.ch Sent: Monday, January 10, 2005 4:50 PM Subject: [Rd] is there String concating function in R? Hi All, I prob. missed it but I would like to make string concating. Is there any string concating function in R? A - abc; B - .jpeg C - c(A,B); it does not do abc.jpeg in string format..? can anyone guide me ? Thank you, Saurin __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Problem with compiling - Freebsd on AMD64 (PR#7489)
Dear Prof's Ripley and Dalgaard , You are correct; this is a compiler error. I assumed that since it was an easy fix to the problem by just changing the compiler option to -O that it could save some headaches for you. As far as the version goes, it is gcc v. 3.4.2 built for freebsd on the amd64: [EMAIL PROTECTED] gcc -v Using built-in specs. Configured with: FreeBSD/amd64 system compiler Thread model: posix gcc version 3.4.2 [FreeBSD] 20040728 Finally, the output was with -g -O2. Using -0 compiles and installs with no problems. Sincerely, Kel On Mon, 10 Jan 2005 15:01:52 + (GMT), Prof Brian Ripley [EMAIL PROTECTED] wrote: In what sense is this a bug in R? If changing your compiler optimization leads to a segfault, it looks very like a compiler bug. So what was the compiler? [R does work using AMD64 on Linux, but only correctly with gcc = 3.3.3.] BTW gdb output with -g -O2 (the R default) ought to be informative, so was this with -O? On Mon, 10 Jan 2005 [EMAIL PROTECTED] wrote: Full_Name: Kelly Black Version: 2.0.1 OS: FreeBSD 5.3 on AMD64 Submission from: (NULL) (149.106.32.93) I downloaded R-2.0.1 from the R website, ran configure then make and got an error. I will paste a copy of the output from the makefile below. The problem was when the makefile tried to run the R binary. When I came across the error I reran configure, but this time with the following arguments: ./configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g This time when I ran make it compiled with no problems. I tried the same thing again only with all of the flags set to -O and again it compiled with no problems. When I ran it with the flags set to -g -O2 it had the same error. A copy of the output from gdb can be found at http://blackk.union.edu/~black/freebsd/R-error.txt, but the output isn't very helpful. The system used is a laptop, Compaq Presario (amd64), under FreeBSD 5.3 compiled for the amd64 architecture. Output from make with flags -O2 [EMAIL PROTECTED] pwd /tmp/R-2.0.1/src/library/base [EMAIL PROTECTED] make echo building package 'base' building package 'base' /usr/local/bin/bash ../../../src/scripts/mkinstalldirs ../../../library/base/R (f=${TMPDIR:-/tmp}/R$$; cat `LC_COLLATE=C ls ./R/*.R ./R/unix/*.R` ${f}; /usr/local/bin/bash ../../../tools/move-if-change ${f} all.R) all.R is unchanged /usr/local/bin/bash ../../../tools/copy-if-change all.R ../../../library/base/R/base ${f} ../../../library/base/R/base is unchanged for f in COPYRIGHTS INDEX SOURCES; do if test -f ./${f}; then /usr/bin/install -c -m 644 ./${f} ../../../library/base; fi; done if test -f DESCRIPTION; then /usr/bin/install -c -m 644 DESCRIPTION ../../../library/base; (tmp=Built: R 2.0.1; ; if test -d ./src; then tmp=${tmp}x86_64-unknown-freebsd5.3; fi; tmp=${tmp}; `date`; unix; echo ${tmp}) ../../../library/base/DESCRIPTION; fi /usr/local/bin/bash ../../../src/scripts/mkinstalldirs ../../../library/base/demo for f in `ls -d ./demo/* | sed -e '/CVS/d' -e '/00Index/d'`; do /usr/bin/install -c -m 644 ${f} ../../../library/base/demo; done /usr/local/bin/bash ../../../src/scripts/mkinstalldirs ../../../library/base/man (f=${TMPDIR:-/tmp}/R$$; for rdfile in ./man/*.Rd ./man/unix/*.Rd; do echo % --- Source file: ${rdfile} ---; cat ${rdfile}; echo '\eof'; done ${f}; /usr/local/bin/bash ../../../tools/move-if-change ${f} ../../../library/base/man/base.Rd) rm -f ../../../library/base/man/base.Rd.gz /usr/bin/gzip ../../../library/base/man/base.Rd /usr/bin/install -c -m 644 ./inst/CITATION ../../../library/base /usr/bin/install -c -m 644 all.R ../../../library/base/R/base cat ./makebasedb.R | R_DEFAULT_PACKAGES=NULL LC_COLLATE=C ../../../bin/R --vanilla --slave /dev/null Floating point exception (core dumped) *** Error code 136 Stop in /tmp/R-2.0.1/src/library/base. __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Brian D. Ripley, [EMAIL PROTECTED] 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 -- ___ __o Kelly Black Phone: (603) 862-3587 \ _`\,_ Department of Math. Stat. FAX: (603) 862-4096 \_(_)/ (_) University of New Hampshire e-mail: [EMAIL PROTECTED] Durham, NH 03824 (USA) WWW: http://www.math.unh.edu/~black __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] is there String concating function in R?
Saurin Jani wrote: Hi All, I prob. missed it but I would like to make string concating. Is there any string concating function in R? A - abc; B - .jpeg C - c(A,B); it does not do abc.jpeg in string format..? can anyone guide me ? ?paste Uwe Ligges Thank you, Saurin __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] is there String concating function in R?
I prob. missed it but I would like to make string concating. Is there any string concating function in R? A - abc; B - .jpeg C - c(A,B); it does not do abc.jpeg in string format..? ?paste __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] XFIG color output (PR#7491)
Full_Name: Chris Haidinyak Version: 2.0.1 1.9.0 OS: Linux x86_64 Submission from: (NULL) (139.95.251.9) Hi, I am using R 1.9.0 (on Linux Redhat AS 3 - x86_64) and 2.0.1 (on Linux Fedora Core 3 - x86_64) and am having problems using graphs created with the xfig option. 1.9.0 problem - sometimes the graph output puts the color definitions in the wrong place in the file. According to the xfig program, color definitions must come before any object. For whatever reason, R sometimes produces xfig files with color definitions in the wrong place. Run demo('graphics') to recreate the problem. 2.0.1 problem - This release seems worse that 1.9.0. All of the graphic output from R to xfig (using the following script xfig() demo('graphics') dev.off() produces only b/w graphs or no graph at all. What is the problem? Am I doing something wrong? Please advise; thank you. Best Regards, Chris Haidinyak __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] S4 class no longer accepts matrix in array slot under 2.0.1
Your example and your subject heading are two different things. If you meant the subject heading, that in fact works. R setClass(a1, representation(x=array)) [1] a1 R new(a1, x=matrix(1:12,3,4)) An object of class a1 Slot x: [,1] [,2] [,3] [,4] [1,]147 10 [2,]258 11 [3,]369 12 That's not what your example does. In your example, the new class extends array, rather than using it as a slot. It would have been clearer if you had said setClass(foo, contains=array), but your code is correct for that purpose. On first examination, I believe the problem is just what the message says it is. You gave as a new object (and NOT as a slot) an object from a subclass of a superclass of foo. This is allowed, but has to be done by replacing the part of a foo object corresponding to the array contained in a matrix object. Of course, we know that's actually the whole object, but nothing has told the software this. And, indeed, it doesn't find the necessary replacement method. Here's an example similar to what you are doing, but using actual classes. Barring screwups on my part, it shows that the mechanism works as asserted. Classes c1, c2, c3 follow the roles of array, matrix, and foo in your example. R setClass(c1, representation(x=numeric)) [1] c1 R setClass(c2, contains=c1) [1] c2 R setClass(c3, contains = c1) [1] c3 R x2 = new(c2, x=1) R x3 = new(c3, x2) R x3 An object of class c3 Slot x: [1] 1 Classes matrix and array are rather peculiar in R; among other things, they act like vector data types in that is.object() is FALSE. And you cannot have an array with a dimension of length 2. R class(array(1:12, dim=c(3,4))) [1] matrix Also, because they don't have a consistent set of slots (they may or may not have a dimnames), they aren't quite real classes in an S4 sense. It would be nice to fix this mess, but not obviously possible while being back compatible. It's possible that there is a fix to get around the particular error here, without breaking the more general pattern--I'll take a look. Otherwise, you may need to follow the approach of your subject heading, and define a new class with an array as a slot. Giles Heywood wrote: I have an S4 class with a slot of class array, and in upgrading to 2.0.1 (from 1.9.1) I have encountered a change in behaviour. This causes me some difficulties if I want to allow 2-dimensional arrays in the slot. The following (in 2.0.1) illustrates the point: setClass(foo,representation(array)) [1] foo a - new(foo,array(NA,2:4)) b - new(foo,matrix(NA,2,3)) Error in as-(`*tmp*`, Classi, value = c(NA, NA, NA, NA, NA, NA)) : No method or default for as() replacement of foo with Class=matrix This last error did not occur under 1.9.1. I conclude that in this context the methods package does not recognise matrix as a subclass of array. However if I use getClass(), I see that R recognises matrix as a subclass of array (and vice-versa). So is this new behaviour correct? You conclude incorrectly, as noted above. [this is a re-posting to R-devel of a question earlier posted to R-help, which attracted limited response] __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] new(call) problem (PR#7490)
Too bad you didn't stick to your earlier intention: I'll leave it up to the developers to designate this as a bug or not, but I would certainly prefer that new() and show() never reports errors when an empty object is passed as an argument (of any class). I agree, assuming what you mean by empty is the default object from the class. But the issue is one of the behavior of the R evaluator, which wants to evaluate the call object when it's passed to the default print() code--just as the error message says. We can maybe get around that, but I don't think your solution below is desirable. There is a reason that the default function reference is called undef: an error _should_ be generated if you evaluate a call to an undefined function. Notice: R tt - new(call) R dput(tt) undef() This works as a show() method, but the current default printing code in R never calls show() for objects of class call so something else would have to be done, in the base package or the evaluator, rather than in methods. R setMethod(show, call, function(object)dput(object)) [1] show R show(tt) undef() R tt Error in print(undef()) : couldn't find function undef [EMAIL PROTECTED] wrote: I have found a solution to the new(call) problem that I believe produces the correct behavior for the default call object, and am also reclassifying this as a bug, as I believe the current behavior to be incorrect. Recap, the following error occurs: new(call) Error in print(undef()) : couldn't find function undef It looks like the problem is that the default object for new(call) is the function undef(), which does not exist. So, the show() and print() methods correspondingly fail. If I initialize the undef() function at the beginning of my code to an empty function: undef - new(function) then new(call) will then reference an existing (yet empty) object that is coerced into a call, and the show and print methods correctly display this object as NULL. Furthermore, I am able to extend this empty call object to other S4 objects without trouble. Now: undef - new(function) new(call) NULL str(new(call)) Formal class 'call' [package methods] with 0 slots list() This, I believe is the preferred behavior of new(call), and I would contend this fix should be included in the R source. Best, Robert -Original Message- From: McGehee, Robert [mailto:[EMAIL PROTECTED] Sent: Saturday, January 08, 2005 6:06 PM To: r-devel@stat.math.ethz.ch Subject: [Rd] new(call) problem The below looks like the show method has trouble with the default call object (or that there is no default call object). Not sure if this is a bug, design problem, or a difficulty on my part using and extending the call class, but it has caused difficulty for when I want to extend the call class into other S4 classes. new(call) Error in print(undef()) : couldn't find function undef This error pops up when I show an object with an empty call slot. Error in show(undef()) : Unable to find the argument object in selecting a method for function show I'll leave it up to the developers to designate this as a bug or not, but I would certainly prefer that new() and show() never reports errors when an empty object is passed as an argument (of any class). Best, Robert Robert McGehee Geode Capital Management, LLC 53 State Street, 5th Floor | Boston, MA | 02109 Tel: 617/392-8396Fax:617/476-6389 mailto:[EMAIL PROTECTED] This e-mail, and any attachments hereto, are intended for use by the addressee(s) only and may contain information that is (i) confidential information of Geode Capital Management, LLC and/or its affiliates, and/or (ii) proprietary information of Geode Capital Management, LLC and/or its affiliates. If you are not the intended recipient of this e-mail, or if you have otherwise received this e-mail in error, please immediately notify me by telephone (you may call collect), or by e-mail, and please permanently delete the original, any print outs and any copies of the foregoing. Any dissemination, distribution or copying of this e-mail is strictly prohibited. __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] segfault (with non-standard use of x11/par(ask=T))
On r-devel, I'm getting a segmentation fault from an admittedly strange sequence of events: (on a fresh session) x11() x11() par(ask = T) plot(1) Hit Return to see next plot: at this point, instead of hitting Return, kill the second X11 window (using the mouse, for example), THEN hit Return. Segmentation fault version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status Under development (unstable) major2 minor1.0 year 2005 month01 day 10 language R This doesn't happen in R 2.0.1, but has been there in r-devel for a while now. Deepayan __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel