Re: [Rd] seq improperly increments dates (PR#9120)
> "Gabor" == Gabor Grothendieck <[EMAIL PROTECTED]> > on Thu, 3 Aug 2006 20:14:24 -0400 writes: Gabor> That's, in fact, the way seq.dates works in the chron package: Gabor> library(chron) Gabor> x <- chron("01/31/2006") Gabor> seq(x, by = "month", length = 2) # 01/31/06 02/28/06 Hmm, so, by "logic", 2006-01-31 + 1month |-> 2006-02-28 2006-01-30 + 1month |-> 2006-02-27 (?) 2006-01-29 + 1month |-> 2006-02-26 (?) 2006-01-28 + 1month |-> 2006-02-25 I really don't like 'chron's behavior which seems much less logical to me than what R does with the official "Date" objects : > options(width=88) > for(d in 28:31) print(seq(as.Date(paste("2006-01", d, sep="-")), len = 6, > by="1 month")) [1] "2006-01-28" "2006-02-28" "2006-03-28" "2006-04-28" "2006-05-28" "2006-06-28" [1] "2006-01-29" "2006-03-01" "2006-03-29" "2006-04-29" "2006-05-29" "2006-06-29" [1] "2006-01-30" "2006-03-02" "2006-03-30" "2006-04-30" "2006-05-30" "2006-06-30" [1] "2006-01-31" "2006-03-03" "2006-03-31" "2006-05-01" "2006-05-31" "2006-07-01" > {which, BTW, *is* reproducible code; the bug report was only reproducible on the day it was posted because it sillily used Sys.date()} Gabor> See the help desk article in R News 4/1 for more about the main Gabor> date classes. Gabor> On 8/3/06, Ponzio, Stephen [CIB-LAVA] <[EMAIL PROTECTED]> wrote: >> You're right, it's tricky. >> >> I guess I would expect Jan. 30 + 1 month = Feb. 28. >> >> Of couse, then Jan. 30 + 1 month = Jan. 28 + 1 month; >> I understand. >> >> Being that "1 month" is imprecise in terms of number of days, >> this anomaly is preferable to skipping months (Jan. 30 + 1 month = March 2), >> in my opinion. >> >> That is what I expected, anyway. >> >> Thanks, >> Stephen [.] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Check for interrupts
Dear All, is there a portable way to test from C whether there are interrupts (ie. ctrl+c) to handle. I know there is R_CheckUserInterrupt() but i would need to call some functions before handling the interrupt. On unix something like if (R_interrupts_pending) { my_cleanup_function(); R_CheckUserInterrupt(); } might work, but this definitely does not work on windows (and possibly also not on osx). Or i need to install finalizers? Could you recommend some up to date docs and/or examples if this is the case? Thank you, Gabor -- Csardi Gabor <[EMAIL PROTECTED]>MTA RMKI, ELTE TTK __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] seq improperly increments dates (PR#9120)
Here are some more seq.dates examples from chron. It seems that if seq.Date cannot output day of the month n (because the month has fewer days) then it outputs n days from the start of the month even if that goes into the next month whereas seq.dates in chron outputs the end of the month in that case. > library(chron) > seq(chron("01/31/2006"), by = "month", length = 6) [1] 01/31/06 02/28/06 03/31/06 04/30/06 05/31/06 06/30/06 > seq(chron("01/30/2006"), by = "month", length = 6) [1] 01/30/06 02/28/06 03/30/06 04/30/06 05/30/06 06/30/06 > seq(chron("01/29/2006"), by = "month", length = 6) [1] 01/29/06 02/28/06 03/29/06 04/29/06 05/29/06 06/29/06 > seq(chron("01/28/2006"), by = "month", length = 6) [1] 01/28/06 02/28/06 03/28/06 04/28/06 05/28/06 06/28/06 > seq(chron("01/27/2006"), by = "month", length = 6) [1] 01/27/06 02/27/06 03/27/06 04/27/06 05/27/06 06/27/06 On 8/4/06, Martin Maechler <[EMAIL PROTECTED]> wrote: > > "Gabor" == Gabor Grothendieck <[EMAIL PROTECTED]> > > on Thu, 3 Aug 2006 20:14:24 -0400 writes: > >Gabor> That's, in fact, the way seq.dates works in the chron package: >Gabor> library(chron) >Gabor> x <- chron("01/31/2006") >Gabor> seq(x, by = "month", length = 2) # 01/31/06 02/28/06 > > Hmm, so, by "logic", > 2006-01-31 + 1month |-> 2006-02-28 > 2006-01-30 + 1month |-> 2006-02-27 (?) > 2006-01-29 + 1month |-> 2006-02-26 (?) > 2006-01-28 + 1month |-> 2006-02-25 > > I really don't like 'chron's behavior which seems much less > logical to me than what R does with the official "Date" objects : > > > options(width=88) > > for(d in 28:31) print(seq(as.Date(paste("2006-01", d, sep="-")), len = 6, > > by="1 month")) > [1] "2006-01-28" "2006-02-28" "2006-03-28" "2006-04-28" "2006-05-28" > "2006-06-28" > [1] "2006-01-29" "2006-03-01" "2006-03-29" "2006-04-29" "2006-05-29" > "2006-06-29" > [1] "2006-01-30" "2006-03-02" "2006-03-30" "2006-04-30" "2006-05-30" > "2006-06-30" > [1] "2006-01-31" "2006-03-03" "2006-03-31" "2006-05-01" "2006-05-31" > "2006-07-01" > > > > {which, BTW, *is* reproducible code; the bug report was only > reproducible on the day it was posted because it sillily used > Sys.date()} > >Gabor> See the help desk article in R News 4/1 for more about the main >Gabor> date classes. > >Gabor> On 8/3/06, Ponzio, Stephen [CIB-LAVA] <[EMAIL PROTECTED]> wrote: >>> You're right, it's tricky. >>> >>> I guess I would expect Jan. 30 + 1 month = Feb. 28. >>> >>> Of couse, then Jan. 30 + 1 month = Jan. 28 + 1 month; >>> I understand. >>> >>> Being that "1 month" is imprecise in terms of number of days, >>> this anomaly is preferable to skipping months (Jan. 30 + 1 month = > March 2), >>> in my opinion. >>> >>> That is what I expected, anyway. >>> >>> Thanks, >>> Stephen > > [.] > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] seq improperly increments dates (PR#9120)
On 8/4/2006 4:18 AM, Martin Maechler wrote: >> "Gabor" == Gabor Grothendieck <[EMAIL PROTECTED]> >> on Thu, 3 Aug 2006 20:14:24 -0400 writes: > > Gabor> That's, in fact, the way seq.dates works in the chron package: > Gabor> library(chron) > Gabor> x <- chron("01/31/2006") > Gabor> seq(x, by = "month", length = 2) # 01/31/06 02/28/06 > > Hmm, so, by "logic", > 2006-01-31 + 1month |-> 2006-02-28 > 2006-01-30 + 1month |-> 2006-02-27 (?) > 2006-01-29 + 1month |-> 2006-02-26 (?) > 2006-01-28 + 1month |-> 2006-02-25 > > I really don't like 'chron's behavior which seems much less > logical to me than what R does with the official "Date" objects : > >> options(width=88) >> for(d in 28:31) print(seq(as.Date(paste("2006-01", d, sep="-")), len = 6, >> by="1 month")) > [1] "2006-01-28" "2006-02-28" "2006-03-28" "2006-04-28" "2006-05-28" > "2006-06-28" > [1] "2006-01-29" "2006-03-01" "2006-03-29" "2006-04-29" "2006-05-29" > "2006-06-29" > [1] "2006-01-30" "2006-03-02" "2006-03-30" "2006-04-30" "2006-05-30" > "2006-06-30" > [1] "2006-01-31" "2006-03-03" "2006-03-31" "2006-05-01" "2006-05-31" > "2006-07-01" > > {which, BTW, *is* reproducible code; the bug report was only > reproducible on the day it was posted because it sillily used > Sys.date()} I think the obvious solution here is to ask R Core to move the earth slightly closer to the sun, so the year is exactly 360 days long, and these problems don't arise. Or perhaps exactly 372 days would be better; that would be further from the sun and would also help with global warming. Duncan Murdoch > > Gabor> See the help desk article in R News 4/1 for more about the main > Gabor> date classes. > > Gabor> On 8/3/06, Ponzio, Stephen [CIB-LAVA] <[EMAIL PROTECTED]> wrote: > >> You're right, it's tricky. > >> > >> I guess I would expect Jan. 30 + 1 month = Feb. 28. > >> > >> Of couse, then Jan. 30 + 1 month = Jan. 28 + 1 month; > >> I understand. > >> > >> Being that "1 month" is imprecise in terms of number of days, > >> this anomaly is preferable to skipping months (Jan. 30 + 1 month = > March 2), > >> in my opinion. > >> > >> That is what I expected, anyway. > >> > >> Thanks, > >> Stephen > >[.] > > __ > 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] Problem with installing R under Windows
On 8/4/2006 7:58 AM, TAN Chong Hui wrote: > I have been trying to install R under Windows from the source by > following the instructions in R Installation and Adminstration. > Met with a list of problems along the way. Building R generally falls under the R-devel topic, and I've moved the comments there. > > 1) Recommended packages: > > I tried to do > >> make lnik-recommended > > and > >> make rsync-recommended > > In both cases, I got the message "no rule to make target" > > Have I gotten the make directory wrongly? You didn't say which directory you were in, but it should be R_HOME/src/gnuwin32. > 2) Building core files: > > After I did > >> make all recommended > > in R_HOME/src/gnuwin32, the process ends with the following error > message: > >> make --no-print-directory -C ../modules \ >> OPTFLAGS='-O3 -Wall -pedantic -std=gnu99' FOPTFLAGS='-O3 -Wall' -f >> Makefile.wi n gcc -shared -s -o lapack.dll lapack.def Lapack.o >> dllversion.o -L../../../bin - lRlapack -lRblas -lR >> c:\minGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: >> cannot fin >> d -lRlapack I assume the extra spaces in the line above are just a result of posting ("Makefile.wi n", "- lRlapack". If not, you've done something very strange. The usual cause of problems when building R in Windows is not having your path set up properly. Some of the Rtools programs have the same names as Windows or Cygwin programs, and you need to be sure the Rtools ones are found first. Once you get the path right, I'd suggest doing "make distclean", and starting over again. You might have some incompatible pieces in your partial build. If you think it's right but it still doesn't work, please post it here. You should also post the R version that you're trying to build, and how you obtained it: there are slight differences between the tarballs and svn working copies. Duncan Murdoch >> collect2: ld returned 1 exit status >> make[5]: *** [lapack.dll] Error 1 >> make[4]: *** [all] Error 2 >> make[3]: *** [all] Error 1 >> make[2]: *** [rmodules] Error 2 >> make[1]: *** [rbuild] Error 2 >> make: *** [all] Error 2 > > What should I be doing here? > > 3) Building manuals > > After I did > >> make manuals > > in R_HOME/src/gnuwin32, the process ends with the error message > > ! LaTeX Error: File `datasets-pkg.tex' not found. > > Type X to quit or to proceed, > or enter new name. (Default extension: tex) > > Enter file name: > ! Emergency stop. > > > l.77 \input{datasets-pkg.tex} > > ! ==> Fatal error occurred, the output PDF file is not finished! > Transcript written on refman.log. > make[1]: *** [refman.pdf] Error 1 > make: *** [manuals] Error 2 > > What should I be doing here? > > > > Can anyone help? > > Thanks. > > Rgds > Chong Hui > > > > [[alternative HTML version deleted]] > > __ > R-help@stat.math.ethz.ch 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. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Rigroup external package ready to go but no incoming at ftp site
Hi, > If you unsuccessfully attempted to upload a file once but got > connected, it will prevent you from trying it again as the file > already exists. Ah! That must be it. I never got a successful completion message, just a hang with a message about going into PASSIVE mode. So some or all of the file must have made it which prevented me from uploading anything by the same name. > > FWIW on a Mac (or any machine with curl) a way to upload a file > successfully is > > curl --disable-epsv -T MYPACKAGE ftp://cran.R-project.org/incoming/ [localhost:~/Desktop] kbhend% curl --disable-epsv -T Rigroup_0.81.0.tar.gz ftp://cran.R-project.org/incoming/ [localhost:~/Desktop] So no error messages and no hang! That seems to have done the trick. > Note that CRAN doesn't work if you use EPSV (which many ftp > programs do by default). I noticed. I am constantly having problems with many ftp servers and my ftp clients on Linux and Mac OSX. There seems to be some mismatch on how the handoff to PASSIVE mode (and particular epsv) seems to be done.I will always use your curl command from now on. Thanks, Kevin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Patch to allow negative argument in head() and tail()
I've now committed your patch proposal, almost unchanged, to R-devel (subversion rev 38792), so this will be available in R 2.4.0, and from tomorrow's R-devel snapshot. Thank you, very much, Vincent! Martin Maechler, ETH Zurich __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] how to test packages under platforms we don't have?
Hi, One final question ... is there an automated build system anyplace for package developers and R -developers to make sure their code works on all platforms. I was able to check with Linux, and MacOSX (both Intel and PPC) but I do not own a Windows box and was unable to test/debug the build in any way on that platform. On my last project (OpenOffice.org), they used something called "tinderbox" to automate the build on all official platforms and post results (and build logs and errors/warnings) to a web site that any contributors could check to make sure anything they changed or wrote did not disrupt any thing else. The main OpenOffice.org developers made available "child workspaces" (typically subsets of the main development tree or even the whole tree) that volunteer developers could commit to that had to be validated via the "tinderbox" and a test harness before being merged back into the tree. That allowed the volunteers more freedom to make changes without ever hurting the tree. And it gave the core developers complete control of when and if, patches and changes from outside volunteers ever make it into the tree. Is there anything like that for R either internally or externally? Thanks, Kevin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] how to test packages under platforms we don't have?
On Fri, 4 Aug 2006, Kevin B. Hendricks wrote: > One final question ... is there an automated build system anyplace > for package developers and R -developers to make sure their code > works on all platforms. I was able to check with Linux, and MacOSX > (both Intel and PPC) but I do not own a Windows box and was unable to > test/debug the build in any way on that platform. > Not really. CRAN does check packages on Linux, Mac OSX and Windows, but there isn't a mechanism for users (or R-developers) to do this on systems they don't have. -thomas Thomas Lumley Assoc. Professor, Biostatistics [EMAIL PROTECTED] University of Washington, Seattle __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] how to test packages under platforms we don't have?
When its on CRAN it will be checked on Windows with the result here: http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html although I guess you are really looking for some way to do this yourself. On 8/4/06, Kevin B. Hendricks <[EMAIL PROTECTED]> wrote: > Hi, > > One final question ... is there an automated build system anyplace > for package developers and R -developers to make sure their code > works on all platforms. I was able to check with Linux, and MacOSX > (both Intel and PPC) but I do not own a Windows box and was unable to > test/debug the build in any way on that platform. > > On my last project (OpenOffice.org), they used something called > "tinderbox" to automate the build on all official platforms and post > results (and build logs and errors/warnings) to a web site that any > contributors could check to make sure anything they changed or wrote > did not disrupt any thing else. > > The main OpenOffice.org developers made available "child > workspaces" (typically subsets of the main development tree or even > the whole tree) that volunteer developers could commit to that had to > be validated via the "tinderbox" and a test harness before being > merged back into the tree. That allowed the volunteers more freedom > to make changes without ever hurting the tree. And it gave the core > developers complete control of when and if, patches and changes from > outside volunteers ever make it into the tree. > > Is there anything like that for R either internally or externally? > > Thanks, > > Kevin > > __ > 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] how to test packages under platforms we don't have?
Thomas Lumley wrote: > On Fri, 4 Aug 2006, Kevin B. Hendricks wrote: >> One final question ... is there an automated build system anyplace >> for package developers and R -developers to make sure their code >> works on all platforms. I was able to check with Linux, and MacOSX >> (both Intel and PPC) but I do not own a Windows box and was unable to >> test/debug the build in any way on that platform. >> > > Not really. CRAN does check packages on Linux, Mac OSX and Windows, but > there isn't a mechanism for users (or R-developers) to do this on systems > they don't have, because "CRAN does check" is used in a wide sense and includes, among others, also my *Windows* server in Dortmund that does the Windows checks. (If you have some Windows license, a virtual machine can do the job.) Uwe Ligges > > -thomas > > Thomas Lumley Assoc. Professor, Biostatistics > [EMAIL PROTECTED] University of Washington, Seattle > > __ > 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
[Rd] 2.3.1 install bug (PR#9123)
Full_Name: Jim Wei Version: 2.3.1 OS: Solaris 8 Submission from: (NULL) (38.112.100.65) I have Successfully installed R from version 1.9 to 2.2 on different computer in Solaris 8(sparc), excep 2.3 and 2.31, There is no error when you "configurare", but when you run command "make", error are as following gcc -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H - g -O2 -std=gnu99 -c plot3d.c -o plot3d.o /usr/ccs/bin/as: "/var/tmp//ccIpMMIb.s", line 7044: error: constant value must b e between -4096 and 4095 *** Error code 1 make: Fatal error: Command failed for target `plot3d.o' Current working directory /opt/R-2.3.0/src/main *** Error code 1 make: Fatal error: Command failed for target `R' Current working directory /opt/R-2.3.0/src/main *** Error code 1 make: Fatal error: Command failed for target `R' Current working directory /opt/R-2.3.0/src *** Error code 1 make: Fatal error: Command failed for target `R' galton:/opt/R-2.3.0> cd .. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] seq improperly increments dates (PR#9120)
Duncan Murdoch wrote: > On 8/4/2006 4:18 AM, Martin Maechler wrote: >>> "Gabor" == Gabor Grothendieck <[EMAIL PROTECTED]> >>> on Thu, 3 Aug 2006 20:14:24 -0400 writes: >> Gabor> That's, in fact, the way seq.dates works in the chron package: >> Gabor> library(chron) >> Gabor> x <- chron("01/31/2006") >> Gabor> seq(x, by = "month", length = 2) # 01/31/06 02/28/06 >> >> Hmm, so, by "logic", >> 2006-01-31 + 1month |-> 2006-02-28 >> 2006-01-30 + 1month |-> 2006-02-27 (?) >> 2006-01-29 + 1month |-> 2006-02-26 (?) >> 2006-01-28 + 1month |-> 2006-02-25 >> >> I really don't like 'chron's behavior which seems much less >> logical to me than what R does with the official "Date" objects : >> >>> options(width=88) >>> for(d in 28:31) print(seq(as.Date(paste("2006-01", d, sep="-")), len = 6, >>> by="1 month")) >> [1] "2006-01-28" "2006-02-28" "2006-03-28" "2006-04-28" "2006-05-28" >> "2006-06-28" >> [1] "2006-01-29" "2006-03-01" "2006-03-29" "2006-04-29" "2006-05-29" >> "2006-06-29" >> [1] "2006-01-30" "2006-03-02" "2006-03-30" "2006-04-30" "2006-05-30" >> "2006-06-30" >> [1] "2006-01-31" "2006-03-03" "2006-03-31" "2006-05-01" "2006-05-31" >> "2006-07-01" >> >> {which, BTW, *is* reproducible code; the bug report was only >> reproducible on the day it was posted because it sillily used >> Sys.date()} > > I think the obvious solution here is to ask R Core to move the earth > slightly closer to the sun, so the year is exactly 360 days long, and > these problems don't arise. > > Or perhaps exactly 372 days would be better; that would be further from > the sun and would also help with global warming. > > Duncan Murdoch I am afraid that moving the earty so far out to induce an ice age, so I would please ask R-core to leave the earth alone! Kjetil > >> Gabor> See the help desk article in R News 4/1 for more about the main >> Gabor> date classes. >> >> Gabor> On 8/3/06, Ponzio, Stephen [CIB-LAVA] <[EMAIL PROTECTED]> wrote: >> >> You're right, it's tricky. >> >> >> >> I guess I would expect Jan. 30 + 1 month = Feb. 28. >> >> >> >> Of couse, then Jan. 30 + 1 month = Jan. 28 + 1 month; >> >> I understand. >> >> >> >> Being that "1 month" is imprecise in terms of number of days, >> >> this anomaly is preferable to skipping months (Jan. 30 + 1 month = >> March 2), >> >> in my opinion. >> >> >> >> That is what I expected, anyway. >> >> >> >> Thanks, >> >> Stephen >> >>[.] >> >> __ >> 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 > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] building windows packages under wine/linux and cross-compiling.
Uwe Ligges <[EMAIL PROTECTED]> writes: > I cannot imagine: Why should one want to perform difficult cross > compiling if you have Windows available? And why should I run R > under wine? If I like Windows, I use Windows, if I have like Linux, > there is no reason to run R under wine. One use-case for running R under wine is for a package developer to be able to test her packages on Windows without having to have a Windows box. At least in Bioconductor, a vast majority of package developers use Linux for their development. Finding ways to allow them to test on Windows (where a majority of _users_ are found) makes a lot of sense to me. And I'm pretty sure that cross-compilation is quite easy. Just like building R from source on Windows, you just follow the 16 easy steps and it works ;-) + seth __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] 2.3.1 install bug (PR#9123)
What compiler is this? This is a compiler error, as the compiler has generated incorrect assembler. That is not a bug in R! This works on with the current versions of gcc (3.4.6 and 4.1.1) on Solaris 8, both 32-bit (as here) and 64-bit. On Fri, 4 Aug 2006, [EMAIL PROTECTED] wrote: > Full_Name: Jim Wei > Version: 2.3.1 > OS: Solaris 8 > Submission from: (NULL) (38.112.100.65) > > > I have Successfully installed R from version 1.9 to 2.2 on different computer > in > Solaris 8(sparc), excep 2.3 and 2.31, > There is no error when you "configurare", but when you run command "make", > error are as following > > gcc -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre > -I. > -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H > - > g -O2 -std=gnu99 -c plot3d.c -o plot3d.o > /usr/ccs/bin/as: "/var/tmp//ccIpMMIb.s", line 7044: error: constant value must > b > e between -4096 and 4095 > *** Error code 1 > make: Fatal error: Command failed for target `plot3d.o' > Current working directory /opt/R-2.3.0/src/main > *** Error code 1 > make: Fatal error: Command failed for target `R' > Current working directory /opt/R-2.3.0/src/main > *** Error code 1 > make: Fatal error: Command failed for target `R' > Current working directory /opt/R-2.3.0/src > *** Error code 1 > make: Fatal error: Command failed for target `R' > galton:/opt/R-2.3.0> cd .. > > __ > 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] residuals.glm for glm(..., y = FALSE) (PR#9124)
Last week I ran into a problem with residuals.glm() for GLMs fitted with glm(..., y = FALSE) For such fits, the residuals of type "deviance", "pearson" and "response" can't be computed (see example below). The reason is that residuals.glm() uses y <- object$y which obviously can't work for such fits. I've checked ?glm and ?residuals.glm and did not find it mentioned explicitely...hence this looks like a bug to me. (I've posted this last week on R-devel and received no reply, hence I resubmitted it to R-bugs so that it does not get lost.) Best, Z ## example for poisson GLM from ?glm d.AD <- data.frame(treatment = gl(3,3), outcome = gl(3,1,9), counts = c(18,17,15,20,10,20,25,13,12)) glm.D93 <- glm(counts ~ outcome + treatment, family = poisson, data = d.AD, y = FALSE) ## residuals cannot be computed residuals(glm.D93, type = "deviance") residuals(glm.D93, type = "pearson") residuals(glm.D93, type = "response") __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Double free or memory corruption problem (PR#9125)
Full_Name: Clem Wang Version: 1.14 (v2129) OS: Mac OS X 10.3.9 Submission from: (NULL) (216.145.49.15) I did a bunch of boxplots with commands like: # the class is in column 1 par(mfrow=c(8,6)) for(i in 2:length(s.df)){ boxplot(split(log(s.df[i]+1), s.df$CLASS),ylab="CLASS"),xlab=names(s.df[i]),horizontal=T); } the dataframe contains about 50,000 rows, 50 columns. the Class (in column 1) has two values: 0 and 1 The I switch to other applications (Firefox, terminal) and left my computer on over night. When I returned to R, i discovered a number of err msgs for a number of different addresses: "Deallocation of a pointer no malloced: (some address); This could be a double free(), or free() called with the middle of an allocataed block; Try setting environment variable MallocHelp to see tools to help debug" The redrawing of my windows became VERY slow and eventually I crashed (see below.) I will try to reproduce this, but I'm not sure that I can. (I reporting this now so I don't lose the Apple Crash Report.) I have 1 GB of Ram running on a 1.33 GHz PowerPC G4. === Date/Time: 2006-08-04 10:47:27 -0700 OS Version: 10.3.9 (Build 7W98) Report Version: 2 Command: R Path:/Applications/R.app/Contents/MacOS/R Version: 1.14 (2129) PID: 496 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x0005 Thread 0 Crashed: 0 libR.dylib 0x01059ab4 GEsystemState + 0xc (engine.c:134) 1 libR.dylib 0x0101d99c Rf_gpptr + 0x24 (base.c:174) 2 libR.dylib 0x01080264 xDevtoNDCUnits + 0x1c (graphics.c:221) 3 libR.dylib 0x01080514 xDevtoInchUnits + 0x1c (graphics.c:270) 4 libR.dylib 0x010808d8 Rf_GConvertXUnits + 0x1c8 (graphics.c:333) 5 libR.dylib 0x01088824 Rf_GStrWidth + 0x54 (graphics.c:2922) 6 libR.dylib 0x010b8474 do_axis + 0x1220 (plot.c:1393) 7 libR.dylib 0x0105dffc GEplayDisplayList + 0xf0 (engine.c:2433) 8 org.R-project.R 0x00016874 RQuartz_DiplayGList + 0x114 9 org.R-project.R 0x00018fb4 -[RDeviceView drawRect:] + 0x118 10 org.R-project.R 0x00015d78 -[RQuartz applicationDidUnhide:] + 0x58 11 com.apple.Foundation0x90a27a94 _nsnote_callback + 0xb0 12 com.apple.CoreFoundation0x901db118 __CFXNotificationPost + 0x1b4 13 com.apple.CoreFoundation0x901dfb7c _CFXNotificationPostNotification + 0x340 14 com.apple.Foundation0x90a258e0 -[NSNotificationCenter postNotificationName:object:userInfo:] + 0x74 15 com.apple.AppKit0x9303e724 -[NSApplication _doUnhideWithoutActivation] + 0x1f0 16 com.apple.AppKit0x9303e4b8 _hideShowHandler + 0x9c 17 com.apple.HIToolbox 0x9809ae50 DispatchEventToHandlers + 0x150 18 com.apple.HIToolbox 0x9809b0c4 SendEventToEventTargetInternal + 0x174 19 com.apple.HIToolbox 0x980ad530 SendEventToEventTarget + 0x28 20 com.apple.AppKit0x92e824a0 _DPSNextEvent + 0x3c8 21 com.apple.AppKit0x92e98cd8 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 0x74 22 org.R-project.R 0x9280 -[RController doProcessEvents:] + 0x60 23 org.R-project.R 0x5cc0 -[RController handleReadConsole:] + 0x54 24 org.R-project.R 0xbe44 Re_ReadConsole + 0x74 25 org.R-project.R 0x00015700 RGUI_ReplIteration + 0x70 26 org.R-project.R 0x00015674 RGUI_ReplConsole + 0x94 27 org.R-project.R 0x000155c8 run_REngineRmainloop + 0x9c 28 org.R-project.R 0xe56c -[REngine runREPL] + 0x4c 29 com.apple.Foundation0x90a239f4 __NSFireTimer + 0x68 30 com.apple.CoreFoundation0x901c5170 __CFRunLoopDoTimer + 0xf4 31 com.apple.CoreFoundation0x901c24d0 __CFRunLoopRun + 0x5c8 32 com.apple.CoreFoundation0x901c69e4 CFRunLoopRunSpecific + 0x148 33 com.apple.HIToolbox 0x9809ee10 RunCurrentEventLoopInMode + 0xac 34 com.apple.HIToolbox 0x980a553c ReceiveNextEventCommon + 0x17c 35 com.apple.HIToolbox 0x980c7638 BlockUntilNextEventMatchingListInMode + 0x60 36 com.apple.AppKit0x92e82258 _DPSNextEvent + 0x180 37 com.apple.AppKit0x92e98cd8 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 0x74 38 com.apple.AppKit0x92ead058 -[NSApplication run] + 0x21c 39 com.apple.AppKit0x92f69774 NSApplicationMain + 0x1d0 40 org.R-project.R 0x2eb0 _start + 0x188 (crt.c:267) 41 dyld0x8fe1a278 _dyld_start + 0x64 Thread 1: 0 libSystem.B.dylib 0x900078b8 mach_msg_trap + 0x8 1 libSystem.B.dylib 0x90007438 mach_msg + 0x38 2 com.unsanity.ape0xc00024ec __ape_internal + 0xca4 3 com.unsanity.ape0xc0001340 __ape_agent + 0x40 4 libSystem.B.dylib
Re: [Rd] Double free or memory corruption problem (PR#9125)
On Fri, 4 Aug 2006, [EMAIL PROTECTED] wrote: > Full_Name: Clem Wang > Version: 1.14 (v2129) There is no such version of R. > OS: Mac OS X 10.3.9 > Submission from: (NULL) (216.145.49.15) > > > I did a bunch of boxplots with commands like: > # the class is in column 1 > par(mfrow=c(8,6)) > for(i in 2:length(s.df)){ > boxplot(split(log(s.df[i]+1), > s.df$CLASS),ylab="CLASS"),xlab=names(s.df[i]),horizontal=T); > } > > the dataframe contains about 50,000 rows, 50 columns. the Class (in column 1) > has two values: 0 and 1 > > The I switch to other applications (Firefox, terminal) and left my computer on > over night. When I returned to R, i discovered a number of err msgs for a > number of different addresses: > > "Deallocation of a pointer no malloced: (some address); This could be a double > free(), or free() called with the middle of an allocataed block; Try setting > environment variable MallocHelp to see tools to help debug" > > The redrawing of my windows became VERY slow and eventually I crashed (see > below.) > > I will try to reproduce this, but I'm not sure that I can. (I reporting this > now so I don't lose the Apple Crash Report.) We do ask you for a reproducible example. Please provide one! (We cannot debug your machine for you, unfortunately.) -- 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
Re: [Rd] Double free or memory corruption problem (PR#9125)
On Aug 4, 2006, at 2:36 PM, [EMAIL PROTECTED] wrote: > On Fri, 4 Aug 2006, [EMAIL PROTECTED] wrote: > >> Full_Name: Clem Wang >> Version: 1.14 (v2129) > > There is no such version of R. > FWIW this is the version of the R-GUI that was shipped with R 2.2.1 and it is known to contain bugs that were fixed since (even at that point the CRAN page was recommending an update). Please use R 2.3.1 + most recent GUI and tell us whether you can still reproduce the bug. Thanks, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] How to prepare/submit packages with external dependency?
Hello, I'd like to submit a new package that ports some code which uses the boost c++ library (i.e., an external dependency). I have written a linux/unix configure file as described in the Witting R Extensions but don't know enough about windows to write a windows configure/makefile. That said, can I still successfully post this package on CRAN. The package passes all recommended tests on my linux machine (which has boost installed). I also posted this on the R-packages list, sorry for the cross-posting. Thanks- Andrew Research Fellow Department of Forest Resources University of Minnesota Office: 305 Green Hall Phone: (612) 624-1714 Fax: (612) 625-5212 web: http://blue.fr.umn.edu __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] How to prepare/submit packages with external dependency?
The RQuantLib package has a boost dependency like this. On Linux machines configure.in is designed to check that Boost has been installed. To build a Windows binary CRAN uses a binary version of QuantLib/Boost that I put together. You might be able to have your package linked against that (actually, "linked" is not the correct term since much of Boost is implemented via header files). I do not think CRAN accepts binary submissions. The package RcppTemplate contains more info on this. ds Andrew Finley wrote: > Hello, > I'd like to submit a new package that ports some code which uses the boost > c++ library (i.e., an external dependency). I have written a linux/unix > configure file as described in the Witting R Extensions but don't know > enough about windows to write a windows configure/makefile. > > That said, can I still successfully post this package on CRAN. The package > passes all recommended tests on my linux machine (which has boost > installed). > > I also posted this on the R-packages list, sorry for the cross-posting. > > Thanks- > Andrew > > > > > Research Fellow > Department of Forest Resources > University of Minnesota > Office: 305 Green Hall > Phone: (612) 624-1714 > Fax: (612) 625-5212 > web: http://blue.fr.umn.edu > > __ > 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] How to prepare/submit packages with external dependency?
Andrew, On Aug 4, 2006, at 4:49 PM, Andrew Finley wrote: > I'd like to submit a new package that ports some code which uses > the boost c++ library (i.e., an external dependency). I have > written a linux/unix configure file as described in the Witting R > Extensions but don't know enough about windows to write a windows > configure/makefile. > The Makefile/Makevars should be essentially the same for WIndows and unix, because Windows build uses GNU make and gcc as well. In most cases the only difference is that you put the Windows settings directly in Makevars.win instead of using autoconf to create Makevars from Makevars.in. The usual procedure for external libraries is to use an environment variable to specify where the library lives on Windows at build time. configure.win is sometimes used to copy the dependent DLL into package's libs directory such that package can be provided in a stand- alone binary form. Another alternative is to use static library instead. You may want to look at other packages on CRAN that use external libraries. I can't really give you any more specific tips, because you didn't even tell us what package you are talking about. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] How to prepare/submit packages with external dependency?
Thanks guys, I'll look at RquantLib as an example. The port requires boost shared pointers. Currently the package resides at http://blue.fr.umn.edu/data/MBA_0.0-2.tar.gz It's all ready to go but for this simple dependency. Thanks again for the info. -Andrew On 4 Aug 2006, Simon Urbanek wrote: > Andrew, > > On Aug 4, 2006, at 4:49 PM, Andrew Finley wrote: > > > I'd like to submit a new package that ports some code which uses > > the boost c++ library (i.e., an external dependency). I have > > written a linux/unix configure file as described in the Witting R > > Extensions but don't know enough about windows to write a windows > > configure/makefile. > > > > The Makefile/Makevars should be essentially the same for WIndows and > unix, because Windows build uses GNU make and gcc as well. In most > cases the only difference is that you put the Windows settings > directly in Makevars.win instead of using autoconf to create Makevars > from Makevars.in. > The usual procedure for external libraries is to use an environment > variable to specify where the library lives on Windows at build time. > configure.win is sometimes used to copy the dependent DLL into > package's libs directory such that package can be provided in a stand- > alone binary form. Another alternative is to use static library > instead. You may want to look at other packages on CRAN that use > external libraries. > I can't really give you any more specific tips, because you didn't > even tell us what package you are talking about. > > Cheers, > Simon > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > Research Fellow Department of Forest Resources University of Minnesota Office: 305 Green Hall Phone: (612) 624-1714 Fax: (612) 625-5212 web: http://blue.fr.umn.edu __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R::Rdconv Rdconv() does not close input file handle (PR#9126)
Full_Name: Bill Dunlap Version: 2.3.0 OS: Windows XP Submission from: (NULL) (71.121.183.214) If you had an Rd file called "file.Rd" and write a perl script containing print "Before Rdconv: " ; system "/usr/sbin/lsof | grep $USER | grep Rd"; Rdconv("file.Rd", "", "example, "../R-ex/file.R"); print "After Rdconv: " ; system "/usr/sbin/lsof | grep $USER | grep Rd"; you will see that file.Rd is still open after Rdconv returns. This messed up perl script on Windows where I tried to remove the directory containing the *.R files after processing them and I could not remove it because the last file processed was still open. Making the following change to RHOME/share/perl/R/Rdconv.pm seems to fix it. 77,78c77,82 < open(rdfile, "<$Rdname") or die "Rdconv(): Couldn't open '$Rdname': $!\n"; < --- > open(my $rdfile, "<$Rdname") or die "Rdconv(): Couldn't open '$Rdfile': $!\n"; > # Before we added the 'my $' in front of rdfile, > # rdfile was not getting closed. Now it will close > # when $rdfile goes out of scope. (We could have added > # a close rdfile at the end of the while(), but > # scoping method is more reliable. 123c127 < while(){ --- > while(<$rdfile>){ -Bill __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] How to prepare/submit packages with external dependency?
Simon has given very useful advice. The only thing I would add is that if any one is submitting to CRAN and concerned to cover Windows, please talk to Uwe Ligges whose autobuilder will make the CRAN Windows binary versions. (Uwe does a great job, and is likely to contact the maintainer if there are problems but it is helpful to make the first approach.) On Fri, 4 Aug 2006, Andrew Finley wrote: > Thanks guys, > I'll look at RquantLib as an example. The port requires boost shared > pointers. Currently the package resides at > http://blue.fr.umn.edu/data/MBA_0.0-2.tar.gz It's all ready to go but for > this simple dependency. Thanks again for the info. > -Andrew > > On 4 Aug 2006, Simon Urbanek wrote: > > Andrew, > > > > On Aug 4, 2006, at 4:49 PM, Andrew Finley wrote: > > > > > I'd like to submit a new package that ports some code which uses > > > the boost c++ library (i.e., an external dependency). I have > > > written a linux/unix configure file as described in the Witting R > > > Extensions but don't know enough about windows to write a windows > > > configure/makefile. > > > > > > > The Makefile/Makevars should be essentially the same for WIndows and > > unix, because Windows build uses GNU make and gcc as well. In most > > cases the only difference is that you put the Windows settings > > directly in Makevars.win instead of using autoconf to create Makevars > > from Makevars.in. > > The usual procedure for external libraries is to use an environment > > variable to specify where the library lives on Windows at build time. > > configure.win is sometimes used to copy the dependent DLL into > > package's libs directory such that package can be provided in a stand- > > alone binary form. Another alternative is to use static library > > instead. You may want to look at other packages on CRAN that use > > external libraries. > > I can't really give you any more specific tips, because you didn't > > even tell us what package you are talking about. > > > > Cheers, > > Simon > > > > __ > > R-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > > Research Fellow > Department of Forest Resources > University of Minnesota > Office: 305 Green Hall > Phone: (612) 624-1714 > Fax: (612) 625-5212 > web: http://blue.fr.umn.edu > > __ > 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