[Rd] url, readLines, source behind a proxy
Hi, when I run R CMD check with flag --as-cran, the process hangs at stage: * checking CRAN incoming feasibility ... I am pretty sure it is a proxy issue. I looked at the check code in the tools package and it seems that the issue is in the local function `.repository_db()` (defined in `tools:::.check_package_CRAN_incoming()`), which eventually calls `url()` with argument open="rb", that hangs probably because it does not use the proxy settings. I had a similar issue with `source()`, which apparently uses internal network functions (not as download.file), but is supposed to work behind a proxy (correct?). Does anybody else have this problem? I was wondering if there is a way around, as I would like to be able to use --as-cran for my checks. Thank you. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Minor bug: plot.table and Axis.table (partially) ignore graphical parameters (patch included)
Dear developers, currently (rev 59060), plot.table and Axis.table do not forward their '...' argument to their calls to axis(). Thus, some graphical parameters (such as col.axis, cex.axis, font.axis) in '...' are ignored (for plot.table: partially ignored [for the x-axis]), which seems to be a minor bug. As a minimal reproducible example, see e.g.: plot(table(rbinom(100,5,0.5)), col.axis="red", cex.axis=2, font.axis=2) Apparently, this behaviour is mainly caused by a suboptimal implementation of (undocumented) support for the logical parameter 'axes' in plot.table's as well as Axis.table's '...' argument. I propose to change the implementation as follows: - make 'axes' an explicit argument of plot.table (as in plot.default, with default TRUE) - drop support for the 'axes' flag in Axis.table's '...' argument (which is neither documented nor supported by other Axis.* functions AFAICS) - in plot.table and Axis.table, forward '...' to axis() (in plot.table: "filtered" via a localaxis()-function similar to localAxis() in plot.default) This would remove the minor bug and simplify the code. As a downside, the change breaks code which uses 'axes' as '...'-argument in a call to Axis.table(). But, as already mentioned, this is neither documented nor working for other methods of Axis. So, please consider applying the attached (not fully tested, but trivial) patch. Thank you and best wishes, Martin -- Dr. Martin Becker, Akad. Rat Statistics and Econometrics Saarland University Campus C3 1, Room 217 66123 Saarbruecken Germany diff -rupN rev59060/trunk/src/library/graphics/R/axis.R patched/trunk/src/library/graphics/R/axis.R --- rev59060/trunk/src/library/graphics/R/axis.R2012-04-17 10:18:28.054985800 +0200 +++ patched/trunk/src/library/graphics/R/axis.R 2012-04-17 10:22:01.636201900 +0200 @@ -54,10 +54,7 @@ Axis.table <- function(x, at, ..., side x0 <- if (is.num) xx else seq.int(x) if(missing(at)) at <- x0 if(missing(labels)) labels <- nx - xaxt <- if (length(as <- list(...))) { - if (!is.null(as$axes) && !as$axes) "n" else as$xaxt - }## else NULL - axis(side, at = at, labels = labels, xaxt = xaxt) + axis(side, at = at, labels = labels, ...) } else stop("only for 1-D table") } diff -rupN rev59060/trunk/src/library/graphics/R/plot.R patched/trunk/src/library/graphics/R/plot.R --- rev59060/trunk/src/library/graphics/R/plot.R2012-04-17 10:19:16.492756300 +0200 +++ patched/trunk/src/library/graphics/R/plot.R 2012-04-17 12:01:06.404223200 +0200 @@ -105,8 +105,9 @@ plot.factor <- function(x, y, legend.tex ## - if "h", make the default lwd depend on number of classes instead of lwd=2 plot.table <- function(x, type = "h", ylim = c(0, max(x)), lwd = 2, - xlab = NULL, ylab = NULL, frame.plot = is.num, ...) + xlab = NULL, ylab = NULL, frame.plot = is.num, axes = TRUE, ...) { +localaxis <- function(..., col, bg, pch, cex, lty, lwd) axis(...) xnam <- deparse(substitute(x)) rnk <- length(dim(x)) if(rnk == 0L) stop("invalid table 'x'") @@ -121,11 +122,7 @@ plot.table <- plot(x0, unclass(x), type = type, ylim = ylim, xlab = xlab, ylab = ylab, frame.plot = frame.plot, lwd = lwd, ..., xaxt = "n") - xaxt <- - if(length(as <- list(...))) { - if(!is.null(as$axes) && !as$axes) "n" else as$xaxt - }## else NULL - axis(1, at = x0, labels = nx, xaxt = xaxt) + if (axes) localaxis(1, at = x0, labels = nx, ...) } else { if(length(as <- list(...)) && !is.null(as$main)) # use 'main' mosaicplot(x, xlab = xlab, ylab = ylab, ...) diff -rupN rev59060/trunk/src/library/graphics/man/plot.table.Rd patched/trunk/src/library/graphics/man/plot.table.Rd --- rev59060/trunk/src/library/graphics/man/plot.table.Rd 2012-04-17 10:47:26.492418700 +0200 +++ patched/trunk/src/library/graphics/man/plot.table.Rd2012-04-17 10:48:53.812413100 +0200 @@ -16,7 +16,7 @@ } \usage{ \method{plot}{table}(x, type = "h", ylim = c(0, max(x)), lwd = 2, - xlab = NULL, ylab = NULL, frame.plot = is.num, \dots) + xlab = NULL, ylab = NULL, frame.plot = is.num, axes = TRUE, \dots) \method{points}{table}(x, y = NULL, type = "h", lwd = 2, \dots) \method{lines}{table}(x, y = NULL, type = "h", lwd = 2, \dots) } @@ -30,6 +30,9 @@ \item{frame.plot}{logical indicating if a frame (\code{\link{box}}) should be drawn in the 1D case. Defaults to true when \code{x} has \code{\link{dimnames}} coerce-able to numbers.} + \item{axes}{a logical value indicating whether both axes should be drawn on +the plot. Use \link{graphical parameter} \code{"xaxt"} or \code{"yaxt"} +to suppress just one of the axes.} \item{\dots}{further graphical arguments, see \code{\link{plot.default}}.} } \seealso{ __ R-devel@r-pr
Re: [Rd] R --debug crashes R on Windows
On 12-04-17 2:19 AM, Henrik Bengtsson wrote: 'R --debug' and 'Rterm --debug' crash R on Windows. Indeed, --debug is not a documented command line option, but it still causes a crash. This occurs with R v2.15.0 patched and R devel - both from 2012-04-09 (r58947). What do you mean by "crash"? For me, they do nothing, i.e. both commands just exit immediately. What the source shows they are trying to do is break to a debugger upon startup, but if there's no debugger there, it might look like a crash. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] url, readLines, source behind a proxy
On Tue, Apr 17, 2012 at 1:01 AM, Renaud Gaujoux wrote: > Hi, > > when I run R CMD check with flag --as-cran, the process hangs at stage: > > * checking CRAN incoming feasibility ... Doesn't it time-out eventually? I'm not behind a proxy but when I've been running 'R CMD check' whenon very poor 3G connection, it had eventually timed out. /Henrik > > I am pretty sure it is a proxy issue. > I looked at the check code in the tools package and it seems that the issue > is in the local function `.repository_db()` (defined in > `tools:::.check_package_CRAN_incoming()`), which eventually calls `url()` > with argument open="rb", that hangs probably because it does not use the > proxy settings. > I had a similar issue with `source()`, which apparently uses internal > network functions (not as download.file), but is supposed to work behind a > proxy (correct?). > Does anybody else have this problem? > > I was wondering if there is a way around, as I would like to be able to use > --as-cran for my checks. > Thank you. > > Renaud > > -- > Renaud Gaujoux > Computational Biology - University of Cape Town > South Africa > > __ > 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 --debug crashes R on Windows
I really meant crash and left my report short thinking others would be able to reproduce this immediately. Details: * Launching 'Rterm --debug' from the Windows Command prompt gives me a "R for Windows terminal front-end has stopped working: A problem caused the ... [Close program]" dialog without any kind of output from R itself. * It happens with both 'i386\Rterm.exe --debug' and 'x64\Rterm.exe --debug' * When doing 'Rgui.exe --debug', there is no message (nor an error message/dialog) and it exits immediately. (* Trying random non-existing command line options (with R, Rterm and Rgui) are properly ignored and gives a warning, e.g. WARNING: unknown option '--dror' when launching R.) * It happens with R v2.10.0, R v2.14.2, R v2.15.0patched, and R devel (binaries from CRAN). On R v2.13.0, it *hangs* (!=exit) without the dialog and it responds to Ctrl-C. * Trying to use WinDbg, I get the following from the core dump: Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 Copyright (c) Microsoft Corporation. All rights reserved. Loading Dump File [C:\Users\hb\AppData\Local\CrashDumps\Rterm.exe.6212.dmp] User Mini Dump File: Only registers, stack and portions of memory are available Symbol search path is: SRV*C:\SymCache*http://msdl.microsoft.com/download/symbols Executable search path is: Windows 7 Version 7601 (Service Pack 1) MP (4 procs) Free x64 Product: WinNt, suite: SingleUserTS Machine Name: Debug session time: Tue Apr 17 11:50:48.000 2012 (UTC - 7:00) System Uptime: not available Process Uptime: 0 days 0:00:16.000 This dump file has a breakpoint exception stored in it. The stored exception information can be accessed via .ecxr. ntdll!ZwWaitForMultipleObjects+0xa: `77a618ca c3 ret I don't find this particularly important, but wanted to share in case there is some deprecated.obsolete code in there for option '--debug'. >From your reply it sounds as if --debug is intended, so ok with me. /Henrik On Tue, Apr 17, 2012 at 3:43 AM, Duncan Murdoch wrote: > On 12-04-17 2:19 AM, Henrik Bengtsson wrote: >> >> 'R --debug' and 'Rterm --debug' crash R on Windows. Indeed, --debug >> is not a documented command line option, but it still causes a crash. >> >> This occurs with R v2.15.0 patched and R devel - both from 2012-04-09 >> (r58947). > > > What do you mean by "crash"? For me, they do nothing, i.e. both commands > just exit immediately. What the source shows they are trying to do is break > to a debugger upon startup, but if there's no debugger there, it might look > like a crash. > > Duncan Murdoch > > __ > 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 --debug crashes R on Windows
I can reproduce the "R for Windows terminal front-end has stopped working" with both R-2.14.1 and R-2.13.0 (i386), and get the "hang but not crash" with both of the x64 binaries for those versions. On 4/17/2012 2:01 PM, Henrik Bengtsson wrote: I really meant crash and left my report short thinking others would be able to reproduce this immediately. Details: * Launching 'Rterm --debug' from the Windows Command prompt gives me a "R for Windows terminal front-end has stopped working: A problem caused the ... [Close program]" dialog without any kind of output from R itself. * It happens with both 'i386\Rterm.exe --debug' and 'x64\Rterm.exe --debug' * When doing 'Rgui.exe --debug', there is no message (nor an error message/dialog) and it exits immediately. (* Trying random non-existing command line options (with R, Rterm and Rgui) are properly ignored and gives a warning, e.g. WARNING: unknown option '--dror' when launching R.) * It happens with R v2.10.0, R v2.14.2, R v2.15.0patched, and R devel (binaries from CRAN). On R v2.13.0, it *hangs* (!=exit) without the dialog and it responds to Ctrl-C. * Trying to use WinDbg, I get the following from the core dump: Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64 Copyright (c) Microsoft Corporation. All rights reserved. Loading Dump File [C:\Users\hb\AppData\Local\CrashDumps\Rterm.exe.6212.dmp] User Mini Dump File: Only registers, stack and portions of memory are available Symbol search path is: SRV*C:\SymCache*http://msdl.microsoft.com/download/symbols Executable search path is: Windows 7 Version 7601 (Service Pack 1) MP (4 procs) Free x64 Product: WinNt, suite: SingleUserTS Machine Name: Debug session time: Tue Apr 17 11:50:48.000 2012 (UTC - 7:00) System Uptime: not available Process Uptime: 0 days 0:00:16.000 This dump file has a breakpoint exception stored in it. The stored exception information can be accessed via .ecxr. ntdll!ZwWaitForMultipleObjects+0xa: `77a618ca c3 ret I don't find this particularly important, but wanted to share in case there is some deprecated.obsolete code in there for option '--debug'. > From your reply it sounds as if --debug is intended, so ok with me. /Henrik On Tue, Apr 17, 2012 at 3:43 AM, Duncan Murdoch wrote: On 12-04-17 2:19 AM, Henrik Bengtsson wrote: 'R --debug' and 'Rterm --debug' crash R on Windows. Indeed, --debug is not a documented command line option, but it still causes a crash. This occurs with R v2.15.0 patched and R devel - both from 2012-04-09 (r58947). What do you mean by "crash"? For me, they do nothing, i.e. both commands just exit immediately. What the source shows they are trying to do is break to a debugger upon startup, but if there's no debugger there, it might look like a crash. Duncan Murdoch __ 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
[Rd] Setting up the NAMESPACE file "automatically" during R CMD build?
Hi, I'd like to compile the NAMESPACE file from a template where things such as S3method() statements are automatically inserted based on code inspection, because doing it by hand is too error prone. I am currently generating a NAMESPACE file this way which I copy to my package root, but I'd like to automate this so it is done when building the *.tar.gz source (during 'R CMD build'), such that is there for building binaries and when installing the package. What is the best way to do this? I was thinking of utilizing a /configure script, but as far I understand "Writing R Extensions", that is only run by 'R CMD INSTALL' not 'R CMD build'. Am I asking the wrong question? Thanks, Henrik __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R-2.15 compile error: fatal error: internal consistency failure
I am unable to compile R-2.15.0 source. I configured it without problems with options that i used many times before ./configure --prefix=/home/andre/R-2.15.0 --enable-byte-compiled-packages=no --with-tcltk --enable-R-shlib=yes Then when i started making it, it died while making lapack, particularly on the line gfortran -fopenmp -fpic -g -O2 -c dlapack3.f -o dlapack3.o dlapack3.f: In function dsbgst: dlapack3.f:12097: fatal error: internal consistency failure compilation terminated. make[4]: *** [dlapack3.o] Error 1 Could anyone give me a clue what is going wrong and how could i fix that? I am running Centos 5.5, in particular, the following $ more /proc/version Linux version 2.6.18-194.el5 (mockbu...@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Apr 2 14:58:14 EDT 2010 Thanks Andre [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R-2.15 compile error: fatal error: internal consistency failure
On 12-04-17 5:24 PM, andre zege wrote: I am unable to compile R-2.15.0 source. I configured it without problems with options that i used many times before ./configure --prefix=/home/andre/R-2.15.0 --enable-byte-compiled-packages=no --with-tcltk --enable-R-shlib=yes Then when i started making it, it died while making lapack, particularly on the line gfortran -fopenmp -fpic -g -O2 -c dlapack3.f -o dlapack3.o dlapack3.f: In function ‘dsbgst’: dlapack3.f:12097: fatal error: internal consistency failure compilation terminated. make[4]: *** [dlapack3.o] Error 1 Could anyone give me a clue what is going wrong and how could i fix that? I am running Centos 5.5, in particular, the following $ more /proc/version Linux version 2.6.18-194.el5 (mockbu...@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Apr 2 14:58:14 EDT 2010 That looks like a message from your compiler. I think gcc 4.1.2 is fairly old (Windows builds are using gcc 4.6.3). Perhaps it's time to upgrade. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] url, readLines, source behind a proxy
Hi Henrik, I am sure it would time out indeed. I am fine with time out due to poor connection, but get a bit frustrated if my connection is fine and timeout occurs because proxy settings are not read. All the more if I have to run R CMD check multiple times and wait for the timeout. But the issue might also be coming from my proxy, which somehow does not like the way url() reads remote content. Could anybody behind a proxy check if the issue can be reproduced? My proxy is in fact provided by cntml, which acts as a local proxy that takes care of tricky authentication protocols with the actual university proxy, not natively supported by my system (Ubuntu). Anybody in this case? Thanks. Renaud On Tue, 17 Apr 2012, Henrik Bengtsson wrote: > On Tue, Apr 17, 2012 at 1:01 AM, Renaud Gaujoux > wrote: > > Hi, > > > > when I run R CMD check with flag --as-cran, the process hangs at stage: > > > > * checking CRAN incoming feasibility ... > > Doesn't it time-out eventually? I'm not behind a proxy but when I've > been running 'R CMD check' whenon very poor 3G connection, it had > eventually timed out. > > /Henrik > > > > > I am pretty sure it is a proxy issue. > > I looked at the check code in the tools package and it seems that the issue > > is in the local function `.repository_db()` (defined in > > `tools:::.check_package_CRAN_incoming()`), which eventually calls `url()` > > with argument open="rb", that hangs probably because it does not use the > > proxy settings. > > I had a similar issue with `source()`, which apparently uses internal > > network functions (not as download.file), but is supposed to work behind a > > proxy (correct?). > > Does anybody else have this problem? > > > > I was wondering if there is a way around, as I would like to be able to use > > --as-cran for my checks. > > Thank you. > > > > Renaud > > > > -- > > Renaud Gaujoux > > Computational Biology - University of Cape Town > > South Africa > > > > __ > > 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