Re: [Rd] Sligthly OT Re: Makefile for embedding OpenBUGS in R package

2007-08-14 Thread Tobias Verbeke
Hi Ben, > Tobias Verbeke businessdecision.com> writes: > >> The resulting package now allows for using an embedded OpenBUGS >> on GNU/Linux without relying on WINE. Thanks to all for their helpful >> comments. > > woo-hoo! this is great! Any chance that this will propagate > to the R2WinBU

Re: [Rd] [Fwd: behavior of L-BFGS-B with trivial function triggers bug in stats4::mle]

2007-08-14 Thread Peter Dalgaard
Ben Bolker wrote: > Petr Savicky cs.cas.cz> writes: > > > >> Could you also include a script, which reproduces the problem? Just >> to see under which conditions the problem occurs and how it >> looks like exactly. >> >> Petr Savicky. >> >> > > The original post has such a script, just u

Re: [Rd] Sligthly OT Re: Makefile for embedding OpenBUGS in R package

2007-08-14 Thread Ben Bolker
Tobias Verbeke businessdecision.com> writes: > The resulting package now allows for using an embedded OpenBUGS > on GNU/Linux without relying on WINE. Thanks to all for their helpful > comments. woo-hoo! this is great! Any chance that this will propagate to the R2WinBUGS package at some poi

Re: [Rd] [Fwd: behavior of L-BFGS-B with trivial functi on triggers bug in stats4::mle]

2007-08-14 Thread Ben Bolker
Petr Savicky cs.cas.cz> writes: > Could you also include a script, which reproduces the problem? Just > to see under which conditions the problem occurs and how it > looks like exactly. > > Petr Savicky. > The original post has such a script, just under the dashed line and above the diff/pa

Re: [Rd] [Fwd: behavior of L-BFGS-B with trivial function triggers bug in stats4::mle]

2007-08-14 Thread Petr Savicky
On Mon, Aug 13, 2007 at 05:49:51PM -0400, Ben Bolker wrote: [snip] > an undefined condition), but it leads to a bug in stats4::mle -- > a spurious error saying that a better fit > has been found during profiling if one tries to profile > a 1-parameter model that was originally fitted with "L-BFGS-B

Re: [Rd] hasNA() / anyNA()?

2007-08-14 Thread Tim Hesterberg
S-PLUS has an anyMissing() function, for which the default is: anyMissing.default <- function(x){ (length(which.na(x)) > 0) } This is more efficient than any(is.na(x)) in the usual case that there are few or no missing values. There are methods for vectors that drop to C code, and method

Re: [Rd] hasNA() / anyNA()?

2007-08-14 Thread Prof Brian Ripley
On Tue, 14 Aug 2007, Benjamin Tyner wrote: > Why not > > hasNA <- function(x) !is.na(match(NA, x)) It hashes the whole table (here x) and so is both slower and uses more memory than is.na(x). I am not clear what is meant by 'efficiency' here, or why it is needed (we have not been told). But w

Re: [Rd] hasNA() / anyNA()?

2007-08-14 Thread Marc Schwartz
On Tue, 2007-08-14 at 07:48 -0400, Benjamin Tyner wrote: > Why not > > hasNA <- function(x) !is.na(match(NA, x)) > > -Ben It does not save anything: Vec1 <- c(NA, rep(1, 1000)) Vec2 <- c(rep(1, 1000), NA) > system.time(!is.na(match(NA, Vec1))) user system elapsed 1.053 0.217

Re: [Rd] hasNA() / anyNA()?

2007-08-14 Thread Benjamin Tyner
Why not hasNA <- function(x) !is.na(match(NA, x)) -Ben __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] PR#9848

2007-08-14 Thread ripley
The behaviour you quote is the documented behaviour in R 2.5.1. Please do RTFM, especially ?install.packages: 'install.packages' can be used to install new packages/bundles. It takes a vector of names and a destination library, downloads the packages from the repositories and ins

Re: [Rd] Sligthly OT Re: Makefile for embedding OpenBUGS in R package

2007-08-14 Thread Tobias Verbeke
Hin-Tak Leung wrote: > Tobias Verbeke wrote: > >> Actually, I think Hin-Tak is right about the absolute path. Even when >> the R code will call the executable that resides in that directory, R >> will call it from any directory and that (current) directory will be >> resolved (at least that is

[Rd] PR#9848

2007-08-14 Thread russell-lenth
Oops -- I meant R version 2.5.1, not 1.5.1. My apologies. -- Russell V. Lenth, Professor Department of Statistics & Actuarial Science(319)335-0814FAX (319)335-3017 The University of Iowa [EMAIL PROTECTED] Iowa City, IA 52242 USA http://www.stat.uiowa.edu/~rle