Re: [Rd] NextMethod causes R 2.2.0 to crash (PR#8416)
Bill, This is a 2.2.0 Windows problem, solved in 2.2.1. What happened was that someone trying to be helpful increased the evaluation nesting limit in 2.1.0, and Windows has a small C stack (2Mb) which can easily be exceeded. I now get > julian(m) Error: evaluation nested too deeply: infinite recursion / options(expressions=)? as I should. The nesting limit has been reduced and the C stack size increased. It is legitimate to call NextMethod in a default method, but it is all too easy to get loops. In your case you want the Date method, not the next method (which since there is only one class will be the default). I would advise Windows users of 2.2.0 to 1) update 2) if that is not possible, set options(expressions=1000). Brian On Wed, 21 Dec 2005 [EMAIL PROTECTED] wrote: > I found writing the following default method the for the generic > function "julian" causes R to crash. > > > julian.default <- function(x, ...) { >x <- as.Date(x) >NextMethod("julian", x, ...) > } > > Here is a test example > >> m <- as.Date("1972-09-27") + 0:10 >> m > [1] "1972-09-27" "1972-09-28" "1972-09-29" "1972-09-30" "1972-10-01" > "1972-10-02" "1972-10-03" > [8] "1972-10-04" "1972-10-05" "1972-10-06" "1972-10-07" >> class(m) > [1] "Date" >> julian(m) > [1] 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 > attr(,"origin") > [1] "1970-01-01" > >> m <- as.character(m) >> class(m) > [1] "character" > >> julian(m) > > < R crashes> > > --please do not edit the information below-- > > Version: > platform = i386-pc-mingw32 > arch = i386 > os = mingw32 > system = i386, mingw32 > status = > major = 2 > minor = 2.0 > year = 2005 > month = 10 > day = 06 > svn rev = 35749 > language = R > > > > Bill Venables, > CMIS, CSIRO Laboratories, > PO Box 120, Cleveland, Qld. 4163 > AUSTRALIA > Office Phone (email preferred): +61 7 3826 7251 > Fax (if absolutely necessary):+61 7 3826 7304 > Mobile (rarely used):+61 4 1963 4642 > Home Phone: +61 7 3286 7700 > mailto:[EMAIL PROTECTED] > http://www.cmis.csiro.au/bill.venables/ > > __ > R-devel@r-project.org 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@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] (Debian Bug 344248): R segfaults when pressing Delete (PR#8420)
--CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Resend after type in mailheader. I have the bug on my system with yesterday's R 2.2.1. A library mismatch is still a likely cause. Dirk -- Hell, there are no rules here - we're trying to accomplish something. -- Thomas A. Edison --CE+1k2dSO48ffgeK Content-Type: message/rfc822 Content-Disposition: inline Return-path: <> X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on basebud.nulle.part X-Spam-Level: X-Spam-Status: No, score=-2.5 required=4.9 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from sccrmhc11.comcast.net ([63.240.77.81]) by master.debian.org with esmtp (Exim 4.50) id 1Ep3A7-0001sJ-Py for [EMAIL PROTECTED]; Wed, 21 Dec 2005 06:33:43 -0600 Received: from basebud.nulle.part (c-67-174-11-185.hsd1.il.comcast.net[67.174.11.185]) by comcast.net (sccrmhc11) with ESMTP id <20051221123308011005fbjme>; Wed, 21 Dec 2005 12:33:13 + Received: from Debian-exim by basebud.nulle.part with local (Exim 4.60) id 1Ep39X-0005dm-5V for [EMAIL PROTECTED]; Wed, 21 Dec 2005 06:33:07 -0600 Auto-Submitted: auto-replied From: Mail Delivery System <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Mail failure - malformed recipient address Message-Id: <[EMAIL PROTECTED]> Date: Wed, 21 Dec 2005 06:33:07 -0600 Delivered-To: [EMAIL PROTECTED] A message that you sent contained one or more recipient addresses that were incorrectly constructed: [EMAIL PROTECTED]@ku.dk: malformed address: @ku.dk may not follow [EMAIL PROTECTED] This address has been ignored. The other addresses in the message were syntactically valid and have been passed on for an attempt at delivery. -- This is a copy of your message, including all the headers. -- MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <[EMAIL PROTECTED]> Date: Wed, 21 Dec 2005 06:33:07 -0600 To: [EMAIL PROTECTED]@ku.dk CC: Ethan Glasser-Camp <[EMAIL PROTECTED]>, [EMAIL PROTECTED], Subject: Re: Bug#344248: R crashes when I press "Delete" In-Reply-To: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> X-Mailer: VM 7.19 under Emacs 21.4.1 From: Dirk Eddelbuettel <[EMAIL PROTECTED]> X-rewrote-sender: [EMAIL PROTECTED] On 21 December 2005 at 01:50, Ethan Glasser-Camp wrote: | Package: r-base-core | Version: 2.2.1-1 | | When I run R, I can cause a crash by simply pressing Delete. Backspace works | fine, and I can use ESS without problems. Uh-oh. | [EMAIL PROTECTED]:~$ R | | R : Copyright 2005, The R Foundation for Statistical Computing | Version 2.2.1 (2005-12-20 r36812) | ISBN 3-900051-07-0 | | R is free software and comes with ABSOLUTELY NO WARRANTY. | You are welcome to redistribute it under certain conditions. | Type 'license()' or 'licence()' for distribution details. | | R is a collaborative project with many contributors. | Type 'contributors()' for more information and | 'citation()' on how to cite R or R packages in publications. | | Type 'demo()' for some demos, 'help()' for on-line help, or | 'help.start()' for an HTML browser interface to help. | Type 'q()' to quit R. | | [Previously saved workspace restored] Could you (temporarily) remove that file? | > Segmentation fault | [EMAIL PROTECTED]:~$ That said, I just tried this where I seemed to have no ~/.RData file. Pressing leads to a SegFault. I will pass this on R Core. Thanks for the bug report. Dirk | | | Here is a list of packages I thought might be relevant: | | $ dpkg -l r-* libreadline* | Desired=Unknown/Install/Remove/Purge/Hold | | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed | |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) | ||/ Name VersionDescription | +++-==-==- | un libreadline-co (no description available) | un libreadline-de (no description available) | ii libreadline-ru 1.8.3+1.8.4pre Readline interface for Ruby 1.8 | ii libreadline4 4.3-18 GNU readline and history libraries, run-time | un libreadline4-d (no description available) | ii libreadline5 5.1-1 GNU readline and history libraries, run-time | ii libreadline5-d 5.1-1 GNU readline and history libraries, developm | ii r-base 2.2.1-1GNU R statistical computing language and env | ii r-base-core2.2.1-1GNU R core of statistical computing language | un r-base-dev (no description available) | ii r-base-html2.2.1-1GNU R html docs for statistical computing sy | ii r-base-latex 2.2.1-1GNU R LaTeX docs for statistical computing s | ii r-cran-boot1.2.24-1 GNU R package for bootstrapping functions fr | ii r-cran-cluster 1.10.2-1 GNU
Re: [Rd] (Debian Bug 344248): R segfaults when pressing Delete (PR#8421)
On Wed, 2005-12-21 at 15:00 +0100, [EMAIL PROTECTED] wrote: > --CE+1k2dSO48ffgeK > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > Resend after type in mailheader. I have the bug on my system with > yesterday's R 2.2.1. A library mismatch is still a likely cause. > > Dirk > On 21 December 2005 at 01:50, Ethan Glasser-Camp wrote: > | Package: r-base-core > | Version: 2.2.1-1 > | > | When I run R, I can cause a crash by simply pressing Delete. Backspace works > | fine, and I can use ESS without problems. > > Uh-oh. > > | [EMAIL PROTECTED]:~$ R > | > | R : Copyright 2005, The R Foundation for Statistical Computing > | Version 2.2.1 (2005-12-20 r36812) > | ISBN 3-900051-07-0 > | > | R is free software and comes with ABSOLUTELY NO WARRANTY. > | You are welcome to redistribute it under certain conditions. > | Type 'license()' or 'licence()' for distribution details. > | > | R is a collaborative project with many contributors. > | Type 'contributors()' for more information and > | 'citation()' on how to cite R or R packages in publications. > | > | Type 'demo()' for some demos, 'help()' for on-line help, or > | 'help.start()' for an HTML browser interface to help. > | Type 'q()' to quit R. > | > | [Previously saved workspace restored] > > Could you (temporarily) remove that file? > > | > Segmentation fault > | [EMAIL PROTECTED]:~$ > > That said, I just tried this where I seemed to have no ~/.RData file. > Pressing leads to a SegFault. > > I will pass this on R Core. > > Thanks for the bug report. > > Dirk > > | > | > | Here is a list of packages I thought might be relevant: > | > | $ dpkg -l r-* libreadline* > | Desired=Unknown/Install/Remove/Purge/Hold > | | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed > | |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: > uppercase=bad) > | ||/ Name VersionDescription > | > +++-==-==- > | un libreadline-co (no description available) > | un libreadline-de (no description available) > | ii libreadline-ru 1.8.3+1.8.4pre Readline interface for Ruby 1.8 > | ii libreadline4 4.3-18 GNU readline and history libraries, > run-time > | un libreadline4-d (no description available) > | ii libreadline5 5.1-1 GNU readline and history libraries, > run-time > | ii libreadline5-d 5.1-1 GNU readline and history libraries, > developm > | ii r-base 2.2.1-1GNU R statistical computing language and > env > | ii r-base-core2.2.1-1GNU R core of statistical computing > language > | un r-base-dev (no description available) > | ii r-base-html2.2.1-1GNU R html docs for statistical computing > sy > | ii r-base-latex 2.2.1-1GNU R LaTeX docs for statistical > computing s > | ii r-cran-boot1.2.24-1 GNU R package for bootstrapping functions > fr > | ii r-cran-cluster 1.10.2-1 GNU R package for cluster analysis by > Rousse > | ii r-cran-foreign 0.8.12-1 GNU R package to read/write data from > other > | ii r-cran-gdata 2.1.2-1GNU R package with data manipulation > tools b > | ii r-cran-gplots 2.2.0-1GNU R package with tools for plotting > data b > | un r-cran-gregmis (no description available) > | ii r-cran-gtools 2.2.2-1GNU R package with R programming tools by > Gr > | ii r-cran-kernsmo 2.22.15-1 GNU R package for kernel smoothing and > densi > | ii r-cran-lattice 0.12-11.1-1GNU R package for 'Trellis' graphics > | ii r-cran-lattice 0.1.1-1GNU R package of additional graphical > displa > | ii r-cran-mgcv1.3-12-1 GNU R package for multiple parameter > smoothi > | ii r-cran-misc3d 0.3-1-1GNU R collection of 3d plot functions and > rg > | ii r-cran-nlme3.1.62-1 GNU R package for (non-)linear mixed > effects > | ii r-cran-quadpro 1.4.7-2GNU R package for solving quadratic > programm > | ii r-cran-rgl 0.65-1 GNU R package for three-dimensional > visualis > | ii r-cran-rpart 3.1.27-1 GNU R package for recursive partitioning > and > | ii r-cran-surviva 2.20-1 GNU R package for survival analysis > | un r-cran-tkrplot (no description available) > | ii r-cran-vr 7.2.23-1 GNU R package accompanying the Venables > and > | un r-doc-html (no description available) > | ii r-doc-info 2.2.1-1GNU R info manuals statistical computing > sys > | un r-doc-pdf (no description available) > | un r-mathlib (no description available) > | ii r-recommended 2.2.1-1GNU R collection of recommended packages > [me > | > | > | Please let me know if there is anything else I can do to help. > | > | Ethan FWIW, I cannot replicate the segfault on FC4, with: Versi
Re: [Rd] (Debian Bug 344248): R segfaults when pressing Delete (PR#8422)
On Wed, 21 Dec 2005 [EMAIL PROTECTED] wrote: > > --CE+1k2dSO48ffgeK > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > Resend after type in mailheader. I have the bug on my system with > yesterday's R 2.2.1. A library mismatch is still a likely cause. This seems to be a readline 5.1 error. I was unable to reproduce it with 4.3 or 5.0. gdb) bt #0 0xb7f4c942 in _rl_dispatch_callback () from /usr/local/lib/libreadline.so.5 #1 0xb7f5fd82 in rl_callback_read_char () from /usr/local/lib/libreadline.so.5 #2 0x0816b98b in Rstd_ReadConsole (prompt=0xb7f6fafc "", buf=0xbf8bb1ec "", len=1024, addtohistory=0) at /users/ripley/R/svn/R-devel/src/unix/sys-std.c:663 Switching the link from libreadline.so.5 back to libreadline.so.5.0 made this behave again. Can you confirm you are running rl5.1? Given the segfault is readline not in R itself, it is at the very least a change in behaviour in a supposedly compatible version of a dynamic library so it seems to me the bug should be assigned to readline not R. Brian > > Dirk > > -- > Hell, there are no rules here - we're trying to accomplish something. > -- Thomas A. Edison > > --CE+1k2dSO48ffgeK > Content-Type: message/rfc822 > Content-Disposition: inline > > Return-path: <> > X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on basebud.nulle.part > X-Spam-Level: > X-Spam-Status: No, score=-2.5 required=4.9 tests=BAYES_00,FORGED_RCVD_HELO > autolearn=ham version=3.1.0 > Received: from sccrmhc11.comcast.net ([63.240.77.81]) > by master.debian.org with esmtp (Exim 4.50) > id 1Ep3A7-0001sJ-Py > for [EMAIL PROTECTED]; Wed, 21 Dec 2005 06:33:43 -0600 > Received: from basebud.nulle.part > (c-67-174-11-185.hsd1.il.comcast.net[67.174.11.185]) > by comcast.net (sccrmhc11) with ESMTP > id <20051221123308011005fbjme>; Wed, 21 Dec 2005 12:33:13 + > Received: from Debian-exim by basebud.nulle.part with local (Exim 4.60) > id 1Ep39X-0005dm-5V > for [EMAIL PROTECTED]; Wed, 21 Dec 2005 06:33:07 -0600 > Auto-Submitted: auto-replied > From: Mail Delivery System <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Mail failure - malformed recipient address > Message-Id: <[EMAIL PROTECTED]> > Date: Wed, 21 Dec 2005 06:33:07 -0600 > Delivered-To: [EMAIL PROTECTED] > > A message that you sent contained one or more recipient addresses that were > incorrectly constructed: > > [EMAIL PROTECTED]@ku.dk: malformed address: @ku.dk may not follow [EMAIL > PROTECTED] > > This address has been ignored. The other addresses in the message were > syntactically valid and have been passed on for an attempt at delivery. > > -- This is a copy of your message, including all the headers. -- > > MIME-Version: 1.0 > Content-Type: text/plain; charset=us-ascii > Content-Transfer-Encoding: 7bit > Message-ID: <[EMAIL PROTECTED]> > Date: Wed, 21 Dec 2005 06:33:07 -0600 > To: [EMAIL PROTECTED]@ku.dk > CC: Ethan Glasser-Camp <[EMAIL PROTECTED]>, [EMAIL PROTECTED], > Subject: Re: Bug#344248: R crashes when I press "Delete" > In-Reply-To: <[EMAIL PROTECTED]> > References: <[EMAIL PROTECTED]> > X-Mailer: VM 7.19 under Emacs 21.4.1 > From: Dirk Eddelbuettel <[EMAIL PROTECTED]> > X-rewrote-sender: [EMAIL PROTECTED] > > > On 21 December 2005 at 01:50, Ethan Glasser-Camp wrote: > | Package: r-base-core > | Version: 2.2.1-1 > | > | When I run R, I can cause a crash by simply pressing Delete. Backspace works > | fine, and I can use ESS without problems. > > Uh-oh. > > | [EMAIL PROTECTED]:~$ R > | > | R : Copyright 2005, The R Foundation for Statistical Computing > | Version 2.2.1 (2005-12-20 r36812) > | ISBN 3-900051-07-0 > | > | R is free software and comes with ABSOLUTELY NO WARRANTY. > | You are welcome to redistribute it under certain conditions. > | Type 'license()' or 'licence()' for distribution details. > | > | R is a collaborative project with many contributors. > | Type 'contributors()' for more information and > | 'citation()' on how to cite R or R packages in publications. > | > | Type 'demo()' for some demos, 'help()' for on-line help, or > | 'help.start()' for an HTML browser interface to help. > | Type 'q()' to quit R. > | > | [Previously saved workspace restored] > > Could you (temporarily) remove that file? > > | > Segmentation fault > | [EMAIL PROTECTED]:~$ > > That said, I just tried this where I seemed to have no ~/.RData file. > Pressing leads to a SegFault. > > I will pass this on R Core. > > Thanks for the bug report. > > Dirk > > | > | > | Here is a list of packages I thought might be relevant: > | > | $ dpkg -l r-* libreadline* > | Desired=Unknown/Install/Remove/Purge/Hold > | | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed > | |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: > uppercase=bad) > | ||/ Name VersionDescription > | > +++-==-==-==
[Rd] R-bugs e-mail {was ... (Debian Bug 344248): ...}
PLEASE, PLEASE: do use [EMAIL PROTECTED] and nothing else (It will go to Kopenhagen alright currently, but if we could ensure everyone used the above address, it would become quite a bit easier to prevent most spam to get into the R bug repository) Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] (Debian Bug 344248): R segfaults when pressi ng Delete (PR#8422)
stats.ox.ac.uk> writes: > Can you confirm you are running rl5.1? Given the segfault is readline not Yes: readline 5.1, just like the bug submitter (see at the very bottom). > compatible version of a dynamic library so it seems to me the bug should > be assigned to readline not R. Looks like it, yes. And from looking at http://bugs.debian.org/libreadline5 it seems that the same behaviour was just found with gdb. Thanks for the quick replies! Dirk > > | ii libreadline-ru 1.8.3+1.8.4pre Readline interface for Ruby 1.8 > > | ii libreadline4 4.3-18 GNU readline and history libraries, run-time > > | un libreadline4-d (no description available) > > | ii libreadline5 5.1-1 GNU readline and history libraries, run-time > > | ii libreadline5-d 5.1-1 GNU readline and history libraries, developm > > | ii r-base 2.2.1-1GNU R statistical computing language and env > > | ii r-base-core2.2.1-1GNU R core of statistical computing language __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] CRAN and R v2.2.1 for Windows
Thanks for the new updates in v2.2.1. I just noticed a few "problems" on http://cran.r-project.org/bin/windows/base/. 1) The CHANGES and NEWS files for v2.2.1 does not include info on v2.2.1 but only details up until v2.2.0, cf. http://cran.r-project.org/src/base/NEWS 2) The patched version is now denoted "beta" (files and installation directory), which I believe is misleading since it is a patch of the "stable" version. Cheers Henrik __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] CRAN and R v2.2.1 for Windows
On 12/21/2005 10:21 AM, Henrik Bengtsson wrote: > Thanks for the new updates in v2.2.1. > > I just noticed a few "problems" on > http://cran.r-project.org/bin/windows/base/. > > 1) The CHANGES and NEWS files for v2.2.1 does not include info on v2.2.1 > but only details up until v2.2.0, cf. > http://cran.r-project.org/src/base/NEWS Yes, we noticed that just after packaging; the patches will fix it. > 2) The patched version is now denoted "beta" (files and installation > directory), which I believe is misleading since it is a patch of the > "stable" version. That should be fixed soon. The handling for betas and patch versions is different, and sometimes there's a bit of a delay in the switchover as things fail on one or two builds. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] CRAN and R v2.2.1 for Windows
Henrik Bengtsson <[EMAIL PROTECTED]> writes: > Thanks for the new updates in v2.2.1. > > I just noticed a few "problems" on > http://cran.r-project.org/bin/windows/base/. > > 1) The CHANGES and NEWS files for v2.2.1 does not include info on v2.2.1 > but only details up until v2.2.0, cf. > http://cran.r-project.org/src/base/NEWS They have info for "R 2.2.0 patched" and 2.2.1 is just a frozen version of that. I.e., the only problem is that we forgot to change the heading (and that nobody bothered to check for this sort of thing in the 2-week beta period!). I noticed the issue just after building the release, but decided that it wasn't worth messing with the SVN tags for something as small as this. > 2) The patched version is now denoted "beta" (files and installation > directory), which I believe is misleading since it is a patch of the > "stable" version. "2.2.0 Patched" is changed to "2.2.1 beta" during the beta period. The release script ends with cd $SRCDIR echo $REL "Patched" > VERSION svn commit -m "setup patch version" so I believe this is a temporary situation and that r-patched will become "2.2.1 Patched" next time around. -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] SVN-REVSION altered when building R-devel out of tree from last snapshot
Martin Maechler wrote: >Herve> Today I downloaded and compiled the last R-devel snapshot. >Herve> The SVN-REVISION in the tarball contains the following: > >Herve> Revision: 36792 >Herve> Last Changed Date: 2005-12-18 > >Herve> But after compiling on Unix (I compiled out of tree), > >i.e. "in a separate build directory tree" > >Herve> I ended up with an SVN-REVSION file containing: > >Herve> Revision: unknown >Herve> Last Changed Date: Today > >Herve> in the build tree. > >I can confirm this wrong behavior (Linux Redhat EL4). >There must be something not yet perfect in our 'make' setup >there. If we are not in the srcdir, we create a 'non-tarball' >file which I think is wrong; in any case, this is buglet we'll fix. > > Hi Martin, This problem was fixed in today's R-devel tarball (R-devel_2005-12-20.tar.bz2). Thanks! H. -- Hervé Pagès E-mail: [EMAIL PROTECTED] Phone: (206) 667-5791 Fax: (206) 667-1319 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] random output with sub(fixed = TRUE)
I've noticed what I think is curious behavior in using 'sub(fixed = TRUE)' and was wondering if my expectation is incorrect. Here is one example: v <- paste(0:10, "asdf", sep = ".") sub(".asdf", "", v, fixed = TRUE) The results I get are > sub(".asdf", "", v, fixed = TRUE) [1] "0" "1\0st\0\0" "2\0\001\0\0" "3\0\001\0\0" [5] "4\0mes\0""5\0\001\0\0" "6\0\0\0\0\0" "7\0\0\0m\0" [9] "8\0\0\0t\0" "9\0\0\0\0" "10\0\0\0\0\0" > I expected "0" in the first entry and everything else would be unchanged. Your results may vary since every time I run 'sub()' in this way, I get a slightly different answer in entires 2 through 11. As it turns out, 'gsub(fixed = TRUE)' gives me the answer I *actually* wanted, which was to replace the string in every entry. But I still think the behavior of 'sub(fixed = TRUE) is a bit odd. > version _ platform x86_64-unknown-linux-gnu arch x86_64 os linux-gnu system x86_64, linux-gnu status major2 minor2.1 year 2005 month12 day 20 svn rev 36812 language R > -roger -- Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] random output with sub(fixed = TRUE)
"Roger D. Peng" <[EMAIL PROTECTED]> writes: > I've noticed what I think is curious behavior in using 'sub(fixed = TRUE)' > and > was wondering if my expectation is incorrect. Here is one example: > > v <- paste(0:10, "asdf", sep = ".") > sub(".asdf", "", v, fixed = TRUE) > > The results I get are > > > sub(".asdf", "", v, fixed = TRUE) > [1] "0" "1\0st\0\0" "2\0\001\0\0" "3\0\001\0\0" > [5] "4\0mes\0""5\0\001\0\0" "6\0\0\0\0\0" "7\0\0\0m\0" > [9] "8\0\0\0t\0" "9\0\0\0\0" "10\0\0\0\0\0" > > > > I expected "0" in the first entry and everything else would be unchanged. > Your > results may vary since every time I run 'sub()' in this way, I get a slightly > different answer in entires 2 through 11. > > As it turns out, 'gsub(fixed = TRUE)' gives me the answer I *actually* > wanted, > which was to replace the string in every entry. But I still think the > behavior > of 'sub(fixed = TRUE) is a bit odd. > > > version > _ > platform x86_64-unknown-linux-gnu > arch x86_64 > os linux-gnu > system x86_64, linux-gnu > status > major2 > minor2.1 > year 2005 > month12 > day 20 > svn rev 36812 > language R > > Argh... year 2005 month12 day 21 and something like this gets discovered. It's a ritual, I tell ya, a ritual! If you look at the output and terminate all strings at the embedded \0, it looks much more sensible, so it should be fairly easy to spot the cause of this bug... -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] random output with sub(fixed = TRUE)
Well, who am I to break this long-standing ritual? :) Interestingly, while the printed output looks wrong, I get > v <- paste(0:10, "asdf", sep = ".") > a <- sub(".asdf", "", v, fixed = TRUE) > b <- as.character(0:10) > identical(a, b) [1] TRUE > -roger Peter Dalgaard wrote: > "Roger D. Peng" <[EMAIL PROTECTED]> writes: > > >>I've noticed what I think is curious behavior in using 'sub(fixed = TRUE)' >>and >>was wondering if my expectation is incorrect. Here is one example: >> >>v <- paste(0:10, "asdf", sep = ".") >>sub(".asdf", "", v, fixed = TRUE) >> >>The results I get are >> >> > sub(".asdf", "", v, fixed = TRUE) >> [1] "0" "1\0st\0\0" "2\0\001\0\0" "3\0\001\0\0" >> [5] "4\0mes\0""5\0\001\0\0" "6\0\0\0\0\0" "7\0\0\0m\0" >> [9] "8\0\0\0t\0" "9\0\0\0\0" "10\0\0\0\0\0" >> > >> >>I expected "0" in the first entry and everything else would be unchanged. >>Your >>results may vary since every time I run 'sub()' in this way, I get a slightly >>different answer in entires 2 through 11. >> >>As it turns out, 'gsub(fixed = TRUE)' gives me the answer I *actually* >>wanted, >>which was to replace the string in every entry. But I still think the >>behavior >>of 'sub(fixed = TRUE) is a bit odd. >> >> > version >> _ >>platform x86_64-unknown-linux-gnu >>arch x86_64 >>os linux-gnu >>system x86_64, linux-gnu >>status >>major2 >>minor2.1 >>year 2005 >>month12 >>day 20 >>svn rev 36812 >>language R >> > > > > Argh... > > year 2005 > month12 > day 21 > > and something like this gets discovered. It's a ritual, I tell ya, a ritual! > > If you look at the output and terminate all strings at the embedded > \0, it looks much more sensible, so it should be fairly easy to spot > the cause of this bug... > -- Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] random output with sub(fixed = TRUE)
On Wed, 21 Dec 2005, Roger D. Peng wrote: > Well, who am I to break this long-standing ritual? :) > > Interestingly, while the printed output looks wrong, I get > > > v <- paste(0:10, "asdf", sep = ".") > > a <- sub(".asdf", "", v, fixed = TRUE) > > b <- as.character(0:10) > > identical(a, b) > [1] TRUE > > identical is wrong! R character strings have a true length and a C-style length: print() prints the all the characters, even those after embedded nuls. identical uses if(strcmp(CHAR(STRING_ELT(x, i)), CHAR(STRING_ELT(y, i))) != 0) which is C-style. The issue is character.c:1015 whose nr gets trashed: note the first answer in the vector is correct. So easy to fix. This code has been as currently for years, so I don't think this is at all related to the release of 2.2.1. > Peter Dalgaard wrote: >> "Roger D. Peng" <[EMAIL PROTECTED]> writes: >> >> >>> I've noticed what I think is curious behavior in using 'sub(fixed = TRUE)' >>> and >>> was wondering if my expectation is incorrect. Here is one example: >>> >>> v <- paste(0:10, "asdf", sep = ".") >>> sub(".asdf", "", v, fixed = TRUE) >>> >>> The results I get are >>> sub(".asdf", "", v, fixed = TRUE) >>> [1] "0" "1\0st\0\0" "2\0\001\0\0" "3\0\001\0\0" >>> [5] "4\0mes\0""5\0\001\0\0" "6\0\0\0\0\0" "7\0\0\0m\0" >>> [9] "8\0\0\0t\0" "9\0\0\0\0" "10\0\0\0\0\0" >>> >>> I expected "0" in the first entry and everything else would be unchanged. >>> Your >>> results may vary since every time I run 'sub()' in this way, I get a >>> slightly >>> different answer in entires 2 through 11. >>> >>> As it turns out, 'gsub(fixed = TRUE)' gives me the answer I *actually* >>> wanted, >>> which was to replace the string in every entry. But I still think the >>> behavior >>> of 'sub(fixed = TRUE) is a bit odd. >>> version >>> _ >>> platform x86_64-unknown-linux-gnu >>> arch x86_64 >>> os linux-gnu >>> system x86_64, linux-gnu >>> status >>> major2 >>> minor2.1 >>> year 2005 >>> month12 >>> day 20 >>> svn rev 36812 >>> language R >> >> >> Argh... >> >> year 2005 >> month12 >> day 21 >> >> and something like this gets discovered. It's a ritual, I tell ya, a ritual! >> >> If you look at the output and terminate all strings at the embedded >> \0, it looks much more sensible, so it should be fairly easy to spot >> the cause of this bug... >> > > -- > Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ > > __ > R-devel@r-project.org 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@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Build error on Mac OS X
Hi, The following commands: > tar zxvf R-devel_2005-12-14.tar.gz > mv R-devel R-2.3 > cd R-2.3 > ./configure --with-blas='-framework vecLib' --with-lapack > make give me the following error on my Mac OS X system: ... g77 -fno-common -g -O2 -c xxxpr.f -o xxxpr.o make[3]: *** No rule to make target `-lintl', needed by `libR.dylib'. Stop. make[2]: *** [R] Error 2 make[1]: *** [R] Error 1 make: *** [R] Error 1 I don't get that problem with R-devel daily snapshots from before 2005-12-14 and I get it with (almost) all snaphots between 2005-12-14 and today. > uname -a Darwin possum2.fhcrc.org 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh powerpc Regards, H. -- Hervé Pagès E-mail: [EMAIL PROTECTED] Phone: (206) 667-5791 Fax: (206) 667-1319 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R-bugs e-mail {was ... (Debian Bug 344248): ...}
> PLEASE, PLEASE: > do use > [EMAIL PROTECTED] > and nothing else Perhaps http://bugs.r-project.org/cgi-bin/R should be updated then? Hadley __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] random output with sub(fixed = TRUE)
On 12/21/2005 5:13 PM, Roger D. Peng wrote: > Well, who am I to break this long-standing ritual? :) > > Interestingly, while the printed output looks wrong, I get > > > v <- paste(0:10, "asdf", sep = ".") > > a <- sub(".asdf", "", v, fixed = TRUE) > > b <- as.character(0:10) > > identical(a, b) > [1] TRUE > > > > -roger I think finding two separate bugs on the day after the release goes a bit beyond what is necessary to satisfy the ritual. Duncan Murdoch > > Peter Dalgaard wrote: > >>"Roger D. Peng" <[EMAIL PROTECTED]> writes: >> >> >> >>>I've noticed what I think is curious behavior in using 'sub(fixed = TRUE)' >>>and >>>was wondering if my expectation is incorrect. Here is one example: >>> >>>v <- paste(0:10, "asdf", sep = ".") >>>sub(".asdf", "", v, fixed = TRUE) >>> >>>The results I get are >>> >>> sub(".asdf", "", v, fixed = TRUE) >>> >>> [1] "0" "1\0st\0\0" "2\0\001\0\0" "3\0\001\0\0" >>> [5] "4\0mes\0""5\0\001\0\0" "6\0\0\0\0\0" "7\0\0\0m\0" >>> [9] "8\0\0\0t\0" "9\0\0\0\0" "10\0\0\0\0\0" >>> >>>I expected "0" in the first entry and everything else would be unchanged. >>>Your >>>results may vary since every time I run 'sub()' in this way, I get a >>>slightly >>>different answer in entires 2 through 11. >>> >>>As it turns out, 'gsub(fixed = TRUE)' gives me the answer I *actually* >>>wanted, >>>which was to replace the string in every entry. But I still think the >>>behavior >>>of 'sub(fixed = TRUE) is a bit odd. >>> >>> version >>> >>> _ >>>platform x86_64-unknown-linux-gnu >>>arch x86_64 >>>os linux-gnu >>>system x86_64, linux-gnu >>>status >>>major2 >>>minor2.1 >>>year 2005 >>>month12 >>>day 20 >>>svn rev 36812 >>>language R >>> >> >>Argh... >> >>year 2005 >>month12 >>day 21 >> >>and something like this gets discovered. It's a ritual, I tell ya, a ritual! >> >>If you look at the output and terminate all strings at the embedded >>\0, it looks much more sensible, so it should be fairly easy to spot >>the cause of this bug... >> > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Build error on Mac OS X
Hervé, On Dec 21, 2005, at 6:12 PM, Herve Pages wrote: > I don't get that problem with R-devel daily snapshots from before > 2005-12-14 > and I get it with (almost) all snaphots between 2005-12-14 and today. Strange - I have only failure on 2005/12/17 - all others built fine (same system: 7.9.0). Did you try the SVN checkout? I can't test the current tar-ball on the Panther machine, because it's running the nightly builds right now... (FWIW those configure parameters are both superfluous on OS X as of R 2.2.0) Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel