Re: [Rd] Save and serialize

2011-02-07 Thread Henrik Bengtsson
On Mon, Feb 7, 2011 at 3:15 PM, Hadley Wickham wrote: > Thanks to you both for the information - that's exactly the level of > detail I was looking for.  I ask because I want to play around with a > function to automatically cache expensive operations to disk, in a way > that can be lazy loaded on

Re: [Rd] Save and serialize

2011-02-07 Thread Hadley Wickham
Thanks to you both for the information - that's exactly the level of detail I was looking for. I ask because I want to play around with a function to automatically cache expensive operations to disk, in a way that can be lazy loaded on the next run. Hadley On Mon, Feb 7, 2011 at 4:06 PM, Henrik

Re: [Rd] R-devel on FreeBSD: Support for C99 complex type is required

2011-02-07 Thread Prof Brian Ripley
A follow-up on this. Cygwin has recently[*] added support for C99 complex math, taken from NetBSD with code that is very similar to that from Steven Moshier available via http://www.moshier.net/c9x_readme.html. That code isn't entirely right, especially not at the cuts on the inverse functio

Re: [Rd] print(...,digits=2) behavior

2011-02-07 Thread Petr Savicky
On Mon, Feb 07, 2011 at 09:56:18AM +0100, Martin Maechler wrote: > > Ben Bolker > > on Sat, 5 Feb 2011 15:58:09 -0500 writes: > > > A bug was recently posted to the R bug database (which > > probably would better have been posted as a query here) as > > to why this happe

Re: [Rd] Save and serialize

2011-02-07 Thread Henrik Bengtsson
Also, if it it adds any value to what you are looking for, the output of serialize() also has header information, cf. R-devel thread 'Small inconsistency in serialize() between R versions and implications on digest()' started March 7, 2007: http://www.mail-archive.com/r-devel@r-project.org/m

Re: [Rd] Save and serialize

2011-02-07 Thread Prof Brian Ripley
On Mon, 7 Feb 2011, Hadley Wickham wrote: Hi all, Is there any relationship between save and serialize? Do they use the same algorithm? See the R-internals manual: there is more info in the R-devel version, not least because saveRDS() is added to the mix. But basically serialize() and sav

[Rd] Save and serialize

2011-02-07 Thread Hadley Wickham
Hi all, Is there any relationship between save and serialize? Do they use the same algorithm? Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ __ R-devel@r-project.org mailing

Re: [Rd] as.list(subclassed function) -> cannot coerce type 'closure' to vector of type 'list'

2011-02-07 Thread Prof Brian Ripley
This is because there is an as.list.function, but your classed object does not inherit from 'function'. However, I think coercing to a list is S-like, and in R we have formals() and body(), and I think you want the former. Seems this was a late 2008 change: maybe the author can tell us why it

Re: [Rd] as.list(subclassed function) -> cannot coerce type 'closure' to vector of type 'list'

2011-02-07 Thread luke-tierney
For this application I would use names(formals(object)) to extract the formal arguments. luke On Mon, 7 Feb 2011, William Dunlap wrote: I was looking for all the glm-related 'family' functions in stats using the following predicate that returns TRUE for any function whose first argument is cal

[Rd] as.list(subclassed function) -> cannot coerce type 'closure' to vector of type 'list'

2011-02-07 Thread William Dunlap
I was looking for all the glm-related 'family' functions in stats using the following predicate that returns TRUE for any function whose first argument is called "link". is.family <- function(object) is.function(object) && identical(names(as.list(object))[1], "link") It threw an err

Re: [Rd] axTicks.Rd documentation bug

2011-02-07 Thread Martin Maechler
> Ben Bolker > on Fri, 04 Feb 2011 10:44:12 -0500 writes: > ?axTicks says: > usr: numeric vector of length four, defaulting to > ‘par("usr")’ giving horizontal (‘x’) and vertical (‘y’) > user coordinate limits. > but this is not how the function is implemen

Re: [Rd] Error with named chunks in Sweave with the development version of R

2011-02-07 Thread Duncan Murdoch
This should be fixed as of r54259. Duncan Murdoch On 07/02/2011 7:36 AM, Clément Calenge wrote: Dear all, There seems to be a problem with named chunks in Sweave with the version of R under development (downloaded yesterday). When I sweave the file toto.Rnw described at the end of this mail (U

Re: [Rd] Error with named chunks in Sweave with the development version of R

2011-02-07 Thread Duncan Murdoch
Thanks, I'll take a look. The "internal error" message was intended to catch this kind of problem. Duncan Murdoch On 07/02/2011 7:36 AM, Clément Calenge wrote: Dear all, There seems to be a problem with named chunks in Sweave with the version of R under development (downloaded yesterday). Wh

[Rd] Error with named chunks in Sweave with the development version of R

2011-02-07 Thread Clément Calenge
Dear all, There seems to be a problem with named chunks in Sweave with the version of R under development (downloaded yesterday). When I sweave the file toto.Rnw described at the end of this mail (Ubuntu 10.04 LTS), the function Sweave returns an Internal error: > utils::Sweave("toto.Rnw") W

Re: [Rd] print(...,digits=2) behavior

2011-02-07 Thread Martin Maechler
> Ben Bolker > on Sat, 5 Feb 2011 15:58:09 -0500 writes: > A bug was recently posted to the R bug database (which > probably would better have been posted as a query here) as > to why this happens: >> print(7.921,digits=2) > [1] 8 >> print(7.92,digits=2)

Re: [Rd] [.raster bug {was "str() on raster objects fails .."}

2011-02-07 Thread Martin Maechler
> Simon Urbanek > on Sun, 6 Feb 2011 20:53:01 -0500 writes: > On Feb 6, 2011, at 8:10 PM, Paul Murrell wrote: >> Hi >> >> On 3/02/2011 1:23 p.m., Simon Urbanek wrote: >>> >>> On Feb 2, 2011, at 7:00 PM, Paul Murrell wrote: >>> Hi