Re: [Rd] checking whether the name space can be loaded with stated dependencies

2008-01-07 Thread Prof Brian Ripley
Hadley sent me the package, and my guess *was* correct. The package is not using lazy-loading, and early on it has (in aaa-top-level.r) TopLevel <- proto(expr = { ... That is 'a top-level computation'. To make this work, you need require("proto") in that file. It also needs require("grid").

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Prof Brian Ripley
On Tue, 8 Jan 2008, Duncan Temple Lang wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > Prof Brian Ripley wrote: >> On Tue, 8 Jan 2008, Duncan Temple Lang wrote: >> >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> While I don't disagree with the general need to provide

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prof Brian Ripley wrote: > On Tue, 8 Jan 2008, Duncan Temple Lang wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> While I don't disagree with the general need to provide an interface >> to SetDllDirectory, etc., I think the discus

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Prof Brian Ripley
On Tue, 8 Jan 2008, Duncan Temple Lang wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > While I don't disagree with the general need to provide an interface > to SetDllDirectory, etc., I think the discussion about 3rd party > libraries has slightly missed the more obvious solution. > I

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 While I don't disagree with the general need to provide an interface to SetDllDirectory, etc., I think the discussion about 3rd party libraries has slightly missed the more obvious solution. Instead of using a DLL, such packages can link against a _sta

Re: [Rd] S3 vs S4 for a simple package

2008-01-07 Thread Gabor Grothendieck
On Jan 7, 2008 2:34 PM, John Chambers <[EMAIL PROTECTED]> wrote: > One thing you cannot do in S3 is to have methods that depend on anything > but the first argument. Actually, you can. Here are two examples. > ### first example - Axis ### > ### note that it can be dispatched on x or at > Axis fu

[Rd] course announcement

2008-01-07 Thread Robert Gentleman
Hi, We will be holding an advanced course in R programming at the FHCRC (Seattle), Feb 13-15. There will be some emphasis on Bioinformatic applications, but not much. Sign up at: https://secure.bioconductor.org/SeattleFeb08/index.php please note space is very limited so make sure y

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Martin Morgan
Thanks Duncan for the hints. libxml2.dll is not in my c:/WINDOWS/system32, but in that of a user of a package of mine. I guess installed by some other application, though I don't really know what it's doing there (or the consequences of removing it). The MSDN site seemed in the long term to point

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Prof Brian Ripley
On Mon, 7 Jan 2008, Duncan Murdoch wrote: > On 1/7/2008 2:51 PM, Martin Morgan wrote: >> The XML package relies on libxml2.dll (e.g., bundled with the CRAN >> binary) installed in library/XML/libs. Unfortunately, >> c:/WINDOWS/system32/libxml2.dll will be found and loaded before >> this. >> >> Is

Re: [Rd] S3 vs S4 for a simple package

2008-01-07 Thread Douglas Bates
On Jan 7, 2008 1:34 PM, John Chambers <[EMAIL PROTECTED]> wrote: > Prof Brian Ripley wrote: > > On Mon, 7 Jan 2008, Robin Hankin wrote: > > > > > >> I am writing a package and need to decide whether to use S3 or S4. > >> > >> I have a single class, "multipol"; this needs methods for "[" and "[<-" >

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Prof Brian Ripley
On Mon, 7 Jan 2008, Duncan Murdoch wrote: > On 1/7/2008 3:06 PM, Oleg Sklyar wrote: >> Should adding PREFIX/library/XML/libs to PATH before system32 solve the >> issue as Windows relies on PATH when searching for libs as well? > > No, system32 is searched before the PATH. See > > http://msdn2.mic

Re: [Rd] S3 vs S4 for a simple package

2008-01-07 Thread Tim Hesterberg
Would you like existing functions such as mean, range, sum, colSums, dim, apply, length, and many more to operate on the array of numbers? If so use an S3 class. If you would like to effectively disable such functions, to prevent them from working on the object unless you write a method that spec

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Prof Brian Ripley
On Mon, 7 Jan 2008, Oleg Sklyar wrote: > Should adding PREFIX/library/XML/libs to PATH before system32 solve the > issue as Windows relies on PATH when searching for libs as well? The Windows code for package XML says > XML:::.onLoad function (libname, pkgname) { if (.Platform$OS.type == "w

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Duncan Murdoch
On 1/7/2008 3:06 PM, Oleg Sklyar wrote: > Should adding PREFIX/library/XML/libs to PATH before system32 solve the > issue as Windows relies on PATH when searching for libs as well? No, system32 is searched before the PATH. See http://msdn2.microsoft.com/en-us/library/ms682586.aspx That page do

Re: [Rd] S3 vs S4 for a simple package

2008-01-07 Thread Oleg Sklyar
In EBImage I have a very similar situation (well, with more methods). It would be impossible to use S3 in my case as my data structures are images and I need at least two dimensions (but in fact use 3), thus 2 variables to dispatch on in [, which are defined for multiple configurations like int

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Duncan Murdoch
On 1/7/2008 2:51 PM, Martin Morgan wrote: > The XML package relies on libxml2.dll (e.g., bundled with the CRAN > binary) installed in library/XML/libs. Unfortunately, > c:/WINDOWS/system32/libxml2.dll will be found and loaded before > this. > > Is there any programatic solution? Search order for

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Oleg Sklyar
Should adding PREFIX/library/XML/libs to PATH before system32 solve the issue as Windows relies on PATH when searching for libs as well? Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466 Martin Morgan wrote: > The XML package relies on libxml2.dll (e.g., bundled with the CRAN

[Rd] Finding windows DLLs

2008-01-07 Thread Martin Morgan
The XML package relies on libxml2.dll (e.g., bundled with the CRAN binary) installed in library/XML/libs. Unfortunately, c:/WINDOWS/system32/libxml2.dll will be found and loaded before this. Is there any programatic solution? Thanks, Martin -- Martin Morgan Computational Biology / Fred Hutchins

[Rd] library(splines) is missing setOldClass(c("bs", "basis")) (PR#10554)

2008-01-07 Thread timh
> library(splines) > extends("bs", "basis") [1] FALSE > setOldClass(c("bs", "basis")) > extends("bs", "basis") [1] TRUE Note that "bs" should inherit from "basis": > temp <- bs(1:99, df=5) > oldClass(temp) [1] "bs""basis" Similarly for "ns" In contrast, in S+: > extends("bs", "basis") [1] T

Re: [Rd] S3 vs S4 for a simple package

2008-01-07 Thread John Chambers
Prof Brian Ripley wrote: > On Mon, 7 Jan 2008, Robin Hankin wrote: > > >> I am writing a package and need to decide whether to use S3 or S4. >> >> I have a single class, "multipol"; this needs methods for "[" and "[<-" >> and I also need a print (or show) method and methods for arithmetic +- >>

Re: [Rd] is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)

2008-01-07 Thread timh
In S-PLUS, is() does catch parent S3 classes. It does not require a setOldClass definition to do so. I would prefer that R work the same way, to make porting code easier. I use is() in S-PLUS for both S3 and S4 classes because it is faster than inherits(). I use inherits() only for testing a ve

Re: [Rd] is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)

2008-01-07 Thread Tim Hesterberg
In S-PLUS, is() does catch parent S3 classes. It does not require a setOldClass definition to do so. I would prefer that R work the same way, to make porting code easier. I use is() in S-PLUS for both S3 and S4 classes because it is faster than inherits(). I use inherits() only for testing a ve

Re: [Rd] Unicode whitespace

2008-01-07 Thread Prof Brian Ripley
On Sat, 5 Jan 2008, hadley wickham wrote: > On Jan 5, 2008 1:40 AM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: >> I presume you want this only in a UTF-8 locale? > > Yes, although my assumption is that this will become an increasing > common locale as time goes by. Probably, except on Windows.

Re: [Rd] chi-squared with zero df (PR#10551)

2008-01-07 Thread maechler
> "MM" == Martin Maechler <[EMAIL PROTECTED]> > on Mon, 7 Jan 2008 09:50:15 +0100 (CET) writes: > "JL" == Jerry Lewis <[EMAIL PROTECTED]> > on Mon, 7 Jan 2008 05:20:23 +0100 (CET) writes: JL> Full_Name: Jerry W. Lewis JL> Version: 2.6.1 JL> OS: Windows XP Pro

Re: [Rd] xtable (PR#10553)

2008-01-07 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: > Full_Name: Soren Feodor Nielsen > Version: 2.5.0 > OS: linux-gnu > Submission from: (NULL) (130.225.103.21) > > > The print-out of xtable in the following example is wrong; instead of yielding > the correct ci's for the second model it repeats the ci's from the first > m

[Rd] xtable (PR#10553)

2008-01-07 Thread feodor
Full_Name: Soren Feodor Nielsen Version: 2.5.0 OS: linux-gnu Submission from: (NULL) (130.225.103.21) The print-out of xtable in the following example is wrong; instead of yielding the correct ci's for the second model it repeats the ci's from the first model. require(xtable) require(MASS) data

Re: [Rd] S3 vs S4 for a simple package

2008-01-07 Thread Prof Brian Ripley
On Mon, 7 Jan 2008, Robin Hankin wrote: > I am writing a package and need to decide whether to use S3 or S4. > > I have a single class, "multipol"; this needs methods for "[" and "[<-" > and I also need a print (or show) method and methods for arithmetic +- > */^. > > In S4, an object of class "mu

[Rd] S3 vs S4 for a simple package

2008-01-07 Thread Robin Hankin
I am writing a package and need to decide whether to use S3 or S4. I have a single class, "multipol"; this needs methods for "[" and "[<-" and I also need a print (or show) method and methods for arithmetic +- */^. In S4, an object of class "multipol" has one slot that holds an array. Objects o

Re: [Rd] chi-squared with zero df (PR#10551)

2008-01-07 Thread maechler
> "JL" == Jerry Lewis <[EMAIL PROTECTED]> > on Mon, 7 Jan 2008 05:20:23 +0100 (CET) writes: JL> Full_Name: Jerry W. Lewis JL> Version: 2.6.1 JL> OS: Windows XP Professional JL> Submission from: (NULL) (24.147.191.250) JL> pchisq(0,0,ncp=lambda) returns 0 instead o