Re: [Rd] Improve error message for bad NAMESPACE file?

2006-02-07 Thread Seth Falcon
On 7 Feb 2006, [EMAIL PROTECTED] wrote: > I suspect this line in namespace.R: > > } > stop(gettextf("unknown namespace directive: %s", deparse(e)), > call. = FALSE, domain = FALSE) > > Does domain=NA solve this? Seems to me for me. I now see an error message like: * Installing *source* packa

Re: [Rd] Improve error message for bad NAMESPACE file?

2006-02-07 Thread Prof Brian Ripley
On Tue, 7 Feb 2006, Seth Falcon wrote: > If a user mis-types a directive in the NAMESPACE file, the error > message is quite cryptic. If it was possible to report the offending > line/text that would likely give a valuable clue to the user. > > Try putting the following line in NAMESPACE > > foo(

[Rd] Improve error message for bad NAMESPACE file?

2006-02-07 Thread Seth Falcon
If a user mis-types a directive in the NAMESPACE file, the error message is quite cryptic. If it was possible to report the offending line/text that would likely give a valuable clue to the user. Try putting the following line in NAMESPACE foo("bar") Then R CMD INSTALL says, * Installing *sour

Re: [Rd] NAMESPACE Q: does import as exist?

2006-02-07 Thread Seth Falcon
On 7 Feb 2006, [EMAIL PROTECTED] wrote: >> On 2/7/2006 8:48 PM, Seth Falcon wrote: >>> Is there a way to rename a function when importing it? I >> want to say, >>> "import yourFunc from Foo as myFunc" in the NAMESPACE file. >> > > I don't think Seth's facility exists yet, but it has occurred t

Re: [Rd] NAMESPACE Q: does import as exist?

2006-02-07 Thread Mark.Bravington
> On 2/7/2006 8:48 PM, Seth Falcon wrote: > > Is there a way to rename a function when importing it? I > want to say, > > "import yourFunc from Foo as myFunc" in the NAMESPACE file. > I don't think Seth's facility exists yet, but it has occurred to me previously that it would be useful when yo

Re: [Rd] NAMESPACE Q: does import as exist?

2006-02-07 Thread Duncan Murdoch
On 2/7/2006 8:48 PM, Seth Falcon wrote: > Is there a way to rename a function when importing it? I want to say, > "import yourFunc from Foo as myFunc" in the NAMESPACE file. > > Does this exist and I've missed it? If it doesn't exist, would others > think it useful (and possible)? I don't kno

[Rd] NAMESPACE Q: does import as exist?

2006-02-07 Thread Seth Falcon
Is there a way to rename a function when importing it? I want to say, "import yourFunc from Foo as myFunc" in the NAMESPACE file. Does this exist and I've missed it? If it doesn't exist, would others think it useful (and possible)? Best, + seth _

[Rd] S4 documentation

2006-02-07 Thread Ross Boylan
1. promptClass generated a file that included \section{Methods}{ No methods defined with class "mspathDistributedCalculator" in the signature. } Yet there are such methods. Is this a not-working yet feature, or is something funny going on (maybe I have definitions in the library and in the global

Re: [Rd] match gets confused by S4 objects

2006-02-07 Thread Martin Maechler
> "Seth" == Seth Falcon <[EMAIL PROTECTED]> > on Tue, 07 Feb 2006 07:20:17 -0800 writes: Seth> On 7 Feb 2006, [EMAIL PROTECTED] wrote: >> The solution has been agreed to be changing the internal >> representation of S4 objects making them a new SEXP (basic R >> "type")

Re: [Rd] match gets confused by S4 objects

2006-02-07 Thread John Chambers
In fact there is a heuristic test that is cheap and reasonably reliable. The class attribute generated for S4 objects itself has an attribute, "package". A C-level test for the existence of that attribute is cheap enough, I would think, that most anti-S4 users wouldn't notice it in match(), c

Re: [Rd] match gets confused by S4 objects

2006-02-07 Thread Seth Falcon
On 7 Feb 2006, [EMAIL PROTECTED] wrote: > The solution has been agreed to be changing the internal > representation of S4 objects making them a new SEXP (basic R > "type"); and as Brian alludes to, the problem is that those in > R-core that want to and are able to do this didn't have the time > fo

Re: [Rd] match gets confused by S4 objects

2006-02-07 Thread Martin Maechler
> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> > on Mon, 6 Feb 2006 19:44:50 + (GMT) writes: BDR> An S4 object is just a list with attributes, so a BDR> vector type. match() works with all vector types BDR> including lists, as you found out (or could have read). yes

Re: [Rd] Problems in d-p-q-r functions (was PR#8528, but unrelated)

2006-02-07 Thread maechler
> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> > on Tue, 7 Feb 2006 08:52:43 + (GMT) writes: BDR> For the record, some of these claims are untrue: >> df(0, 2, 2) BDR> [1] 1 >> df(0, 1.3, 2) BDR> [1] Inf Well, these first two I had fixed in the mean time. So I

Re: [Rd] Problems in d-p-q-r functions (was PR#8528, but unrelated)

2006-02-07 Thread Prof Brian Ripley
For the record, some of these claims are untrue: > df(0, 2, 2) [1] 1 > df(0, 1.3, 2) [1] Inf > x <- 1e-170 > pbeta(x, x, x) [1] 0.5 qnbinom(1e-10,1e3,1e-7,TRUE,FALSE) is an error, and so is qnbinom(1E-300,0.02,100) Here we can guess at what you meant, maybe correctly. There were co