Re: [Rd] S3 method dispatch - can methods come from the enclosing environment?

2011-05-17 Thread Bill.Venables
My apologies... how embarrassing. Please resume your normal duties. :-) Bill. -Original Message- From: Simon Urbanek [mailto:simon.urba...@r-project.org] Sent: Wednesday, 18 May 2011 10:36 AM To: Venables, Bill (CMIS, Dutton Park) Cc: r-devel@r-project.org Subject: Re: [Rd] S3 method

Re: [Rd] S3 method dispatch - can methods come from the enclosing environment?

2011-05-17 Thread Simon Urbanek
Bill, I suspect you have a typo there [class(x) instead of class(z)] which is why it doesn't work. Without the typo it does: > tstFn <- local({ + print.tst <- function(x, ...) cat("found it!") + + function(x) print(x) + }) > > z <- "The cat sat on the mat." > class(z) <- "tst" > > tstFn(z

[Rd] S3 method dispatch - can methods come from the enclosing environment?

2011-05-17 Thread Bill.Venables
I was surprised to see that S3 methods are not found if they only reside in the enclosing environment. E.g.: > tstFn <- local({ + print.tst <- function(x, ...) cat("found it!") + + function(x) print(x) + }) > > z <- "The cat sat on the mat." > class(x) <- "tst" > > tstFn(z) [1] "The cat s

Re: [Rd] By default, `names<-` alters S4 objects

2011-05-17 Thread Hervé Pagès
On 11-05-17 01:15 PM, John Chambers wrote: On 5/17/11 9:53 AM, Hervé Pagès wrote: On 11-05-17 09:04 AM, John Chambers wrote: One point that may have been unclear, though it's surprising if so. The discussion was about assigning names to S4 objects from classes that do NOT have a formal "names

Re: [Rd] By default, `names<-` alters S4 objects

2011-05-17 Thread John Chambers
On 5/17/11 9:53 AM, Hervé Pagès wrote: On 11-05-17 09:04 AM, John Chambers wrote: One point that may have been unclear, though it's surprising if so. The discussion was about assigning names to S4 objects from classes that do NOT have a formal "names" slot. Of course, having a "names" slot is

[Rd] lines.loess method - in order to make the plotting of loess consistent with that of lowess

2011-05-17 Thread Tal Galili
Hello dear R developers, # Bellow is an added method to lines to make the plotting of loess consistent with what we get when using lines on lowess (which is also, IMHO, more "intuitive") lines.loess <- function(object,...) { # object: a loess object to plot using lines # ...: passes to lines ss

Re: [Rd] Windows Rzlib.dll gzopen and friends

2011-05-17 Thread Martin Morgan
R developers, If the absence of a more complete zlib is a permanent change, then is the best strategy to build and distribute a package that wraps a functional zlib? This seems like it will create problems with symbol resolution at the least. Including a zlib in each package that uses it also

Re: [Rd] By default, `names<-` alters S4 objects

2011-05-17 Thread Hervé Pagès
On 11-05-17 09:04 AM, John Chambers wrote: One point that may have been unclear, though it's surprising if so. The discussion was about assigning names to S4 objects from classes that do NOT have a formal "names" slot. Of course, having a "names" slot is not illegal, it's what one should do to de

Re: [Rd] By default, `names<-` alters S4 objects

2011-05-17 Thread John Chambers
One point that may have been unclear, though it's surprising if so. The discussion was about assigning names to S4 objects from classes that do NOT have a formal "names" slot. Of course, having a "names" slot is not illegal, it's what one should do to deal with names in S4. Look at class "na

Re: [Rd] Reproducible use case for R crash after updating R

2011-05-17 Thread Mark.Bravington
The ability to do a "wounded load", when a proper load() can't be completed but you still want as much of the stuff as possible, would be very useful. In my experience, the trouble has invariably been a missing namespace, eg (as in Henrik's example) from a package that can't be found. That's OK

Re: [Rd] Reproducible use case for R crash after updating R

2011-05-17 Thread Duncan Murdoch
On 11-05-16 11:59 PM, Henrik Bengtsson wrote: Great, thanks for this. On Fri, May 13, 2011 at 2:34 PM, Duncan Murdoch wrote: A simple version of a fix is now in R-devel: if the .RData file can't be loaded during startup, an error message is printed, and R starts with an empty workspace. I'

Re: [Rd] RCMD check fails on "checkin installed package size"

2011-05-17 Thread Stefan McKinnon Høj-Edwards
Hello Duncan, This is what I get: C:\Users\STME\Documents\R\win-library\2.13\AnnotationFuncs>du -k 209 ./doc 24 ./help 8 ./html 9 ./Meta 10 ./R 279 . Kind regards, Stefan McKinnon Høj-Edwards Dept. of Genetics and Biotechnology PhD student Fa