[Rd] Unable to reload Rdoc

2012-01-27 Thread Mark Cowley
Dear list, I'm hoping the R guru's can help with an error i've been getting for at least a year during active package development. I have a package loaded & spot a documentation bug, so I: edit the Rd file (or in the roxygen header + roxygenize); then R CMD BUILD, R CMD INSTALL then in the same

Re: [Rd] serialize/unserialize vector improvement

2012-01-27 Thread Prof Brian Ripley
On 22/01/2012 13:56, Prof Brian Ripley wrote: This has languished for a long time, and we should make a decision before FF for 2.15.0. It seems to me that in so far as there is a problem, it is that we serialize via XDR, and that since that was invented little-endian CPUs have taken over the wor

Re: [Rd] Unable to reload Rdoc

2012-01-27 Thread Prof Brian Ripley
This is simply not supported. Lazy-load databases are cached, and you cannot expect to change them during the R session once they have been used. Spend the few milliseconds needed to start a new session. And R CMD Rdconv is a much simpler way to check a changed .Rd file. On 27/01/2012 09:47,

[Rd] Numerical instability in new R Windows development version

2012-01-27 Thread Hans W Borchers
I have a question concerning the new Windows toolchain for R >= 2.14.2. When trying out my package 'pracma' on the win-builder development version it will stop with the following error message: > f3 <- function(x, y) sqrt((1 - (x^2 + y^2)) * (x^2 + y^2 <= 1)) > dblquad(f3, -1, 1, -1, 1) #

Re: [Rd] Numerical instability in new R Windows development version

2012-01-27 Thread Duncan Murdoch
On 12-01-27 7:23 AM, Hans W Borchers wrote: I have a question concerning the new Windows toolchain for R>= 2.14.2. When trying out my package 'pracma' on the win-builder development version it will stop with the following error message: > f3<- function(x, y) sqrt((1 - (x^2 + y^2)) * (x^2 + y

Re: [Rd] Numerical instability in new R Windows development version

2012-01-27 Thread peter dalgaard
On Jan 27, 2012, at 13:23 , Hans W Borchers wrote: > (1 - (x^2 + y^2)) * (x^2 + y^2 <= 1) > > It appears to be an often used trick in numerical analysis. One advantage is > that a function using it is immediately vectorized while an expression such > as, e.g., "max(0, 1 - (x^2 + y^2))" is not.

Re: [Rd] Unable to reload Rdoc

2012-01-27 Thread Hadley Wickham
On Fri, Jan 27, 2012 at 3:47 AM, Mark Cowley wrote: > Dear list, > I'm hoping the R guru's can help with an error i've been getting for at least > a year during active package development. > > I have a package loaded & spot a documentation bug, so I: > edit the Rd file (or in the roxygen header +

Re: [Rd] Ignore user interrupts

2012-01-27 Thread luke-tierney
On Thu, 26 Jan 2012, Sharpie wrote: Sharpie wrote evalWithoutInterrupts <- function(expr, envir = parent.frame()) { .Call(do_evalWithoutInterrupts, expr, envir) } With a C-level implemention: SEXPR do_evalWithoutInterrupts(SEXP expr, SEXP envir) { SEXP result; BEGIN_SUSPEND_INTERRUP

Re: [Rd] Silently loading and Depends: versus NAMESPACE imports

2012-01-27 Thread Dirk Eddelbuettel
On 12 January 2012 at 12:12, Hervé Pagès wrote: | Hi Dirk, | | On 01/11/2012 11:42 AM, Dirk Eddelbuettel wrote: | > | > R CMD check really hates it when my .onLoad() function contains | > suppressMessages(library(foo)) | | Note that you can always fool 'R CMD check' by doing something like:

[Rd] misfeature: forced file.copy() of a file over itself truncates the file ...

2012-01-27 Thread Ben Bolker
Try this: fn <- "tmp.dat" x <- 1:3 dump("x",file=fn) file.info(fn) ## 9 bytes file.copy(paste("./",fn,sep=""),fn,overwrite=TRUE) file.info(fn) ## 0 bytes (!!) Normally file.copy() checks and disallows overwriting a file with itself, but it only checks whether character string '

Re: [Rd] Numerical instability in new R Windows development version

2012-01-27 Thread Prof Brian Ripley
On 27/01/2012 13:26, Duncan Murdoch wrote: On 12-01-27 7:23 AM, Hans W Borchers wrote: I have a question concerning the new Windows toolchain for R>= 2.14.2. When trying out my package 'pracma' on the win-builder development version it will stop with the following error message: > f3<- function

Re: [Rd] misfeature: forced file.copy() of a file over itself truncates the file ...

2012-01-27 Thread William Dunlap
Since the problem can only occur if the 'to' file exists, a check like if (normalizePath(from) == normalizePath(to)) { stop("'from' and 'to' files are the same") } (after verifying that 'to', and 'from', exist) would avoid the problem. S+ has a function, match.path, that can say if two

Re: [Rd] Numerical instability in new R Windows development version

2012-01-27 Thread Duncan Murdoch
On 27/01/2012 12:32 PM, Prof Brian Ripley wrote: On 27/01/2012 13:26, Duncan Murdoch wrote: > On 12-01-27 7:23 AM, Hans W Borchers wrote: >> I have a question concerning the new Windows toolchain for R>= 2.14.2. >> When trying out my package 'pracma' on the win-builder development >> version

Re: [Rd] Numerical instability in new R Windows development version

2012-01-27 Thread Duncan Murdoch
On 27/01/2012 1:26 PM, Duncan Murdoch wrote: On 27/01/2012 12:32 PM, Prof Brian Ripley wrote: > On 27/01/2012 13:26, Duncan Murdoch wrote: > > On 12-01-27 7:23 AM, Hans W Borchers wrote: > >> I have a question concerning the new Windows toolchain for R>= 2.14.2. > >> When trying out my

Re: [Rd] Numerical instability in new R Windows development version

2012-01-27 Thread Duncan Murdoch
On 27/01/2012 12:32 PM, Prof Brian Ripley wrote: On 27/01/2012 13:26, Duncan Murdoch wrote: > On 12-01-27 7:23 AM, Hans W Borchers wrote: >> I have a question concerning the new Windows toolchain for R>= 2.14.2. >> When trying out my package 'pracma' on the win-builder development >> version

Re: [Rd] Numerical instability in new R Windows development version

2012-01-27 Thread Stephen Weston
On Fri, Jan 27, 2012 at 1:40 PM, Duncan Murdoch wrote: > On 27/01/2012 12:32 PM, Prof Brian Ripley wrote: >> >> On 27/01/2012 13:26, Duncan Murdoch wrote: >> >  On 12-01-27 7:23 AM, Hans W Borchers wrote: >> >>  I have a question concerning the new Windows toolchain for R>= 2.14.2. >> >>  When try

Re: [Rd] Ignore user interrupts

2012-01-27 Thread Charlie Sharpsteen
On Fri, Jan 27, 2012 at 6:25 AM, wrote: > On Thu, 26 Jan 2012, Sharpie wrote: >> The only odd thing I came across was when I tried to test this function >> using `Sys.sleep` instead of a long loop: >> >>   evalWithoutInterrupts(Sys.sleep(3);message("Hello, world!")}) >> >> The call can be interru

[Rd] .C returned array has odd results

2012-01-27 Thread Jonathan Lisic
Hi, I'm sure this is a fairly simple problem, but I can't seem to find any specific information in the documentation as to what is going on. I am writing a simple nearest neighbor program that takes in a set of of points on a plane and returns the neighbors of those points, for a fixed number of n

Re: [Rd] ftable.formula

2012-01-27 Thread Brett Presnell
William Dunlap writes: > Put the formula first in the argument list or label > the data argument data= and put the formula after it > if you want to use the formula method for ftable. Ack! So it was a question for R-help after all. Thanks Bill, especially for being so polite about it. __

Re: [Rd] .C returned array has odd results

2012-01-27 Thread Duncan Murdoch
On 27/01/2012 2:46 PM, Jonathan Lisic wrote: Hi, I'm sure this is a fairly simple problem, but I can't seem to find any specific information in the documentation as to what is going on. I am writing a simple nearest neighbor program that takes in a set of of points on a plane and returns the nei

[Rd] The following code (using rgamma) hangs

2012-01-27 Thread Faheem Mitha
Hi, I'm seeing something that may be a bug in R's standalone math library, which is packaged by Debian as r-mathlib. I reported it to the Debian BTS as http://bugs.debian.org/657573 I'm using Debian squeeze, and the code was tested with r-mathlib 2.11.1-6 (default on stable) and 2.14.1-1 (f

Re: [Rd] The following code (using rgamma) hangs

2012-01-27 Thread Dirk Eddelbuettel
On 28 January 2012 at 02:33, Faheem Mitha wrote: | | Hi, | | I'm seeing something that may be a bug in R's standalone math library, | which is packaged by Debian as r-mathlib. I reported it to the Debian BTS | as http://bugs.debian.org/657573 | | I'm using Debian squeeze, and the code was tes

Re: [Rd] Unable to reload Rdoc

2012-01-27 Thread Henrik Bengtsson
Related: To simplify reloading a help page after restarting R, I do have the following in my ~/.Rprofile: # Always only the HTML help on the same port local({ port <- sum(c(1e3,10)*as.double(R.Version()[c("major", "minor")])); ports <- 10*port + 0:9; options(help.ports=ports); }); # Try to

Re: [Rd] The following code (using rgamma) hangs

2012-01-27 Thread Faheem Mitha
On Fri, 27 Jan 2012, Dirk Eddelbuettel wrote: | Dirk also pointed out (in the bug report) that you get the following | | ## | int main(void) | { | set_seed(0, 0); | cout << "one normal " << norm_rand() << endl; | } | ###