Re: [Rd] S4 dispatch and S3 "connection" objects

2009-12-15 Thread Romain Francois
On 12/16/2009 12:52 AM, John Chambers wrote: We should probably incorporate this information in the pre-defined S4 versions of the classes, since these are basic S3 classes. That'd be good. Anybody see a down side? Meanwhile, your approach is a reasonable workaround. John Michael Lawrence

Re: [Rd] split.data.frame

2009-12-15 Thread Romain Francois
On 12/16/2009 12:14 AM, Peter Dalgaard wrote: Romain Francois wrote: Hello, I very much enjoy "with" and "subset" semantics for data frames and was wondering if we could have something similar with split, basically by evaluating the second argument "with" the data frame : I seem to recall tha

Re: [Rd] S4 dispatch and S3 "connection" objects

2009-12-15 Thread John Chambers
We should probably incorporate this information in the pre-defined S4 versions of the classes, since these are basic S3 classes. Anybody see a down side? Meanwhile, your approach is a reasonable workaround. John Michael Lawrence wrote: > On Mon, Dec 14, 2009 at 11:36 PM, Romain Francois < > ro

Re: [Rd] split.data.frame

2009-12-15 Thread Peter Dalgaard
Romain Francois wrote: Hello, I very much enjoy "with" and "subset" semantics for data frames and was wondering if we could have something similar with split, basically by evaluating the second argument "with" the data frame : I seem to recall that this idea was considered and rejected when

Re: [Rd] split.data.frame

2009-12-15 Thread Felix Andrews
I agree, I would definitely appreciate that. A simpler implementation: split.data.frame <- function(x, f, drop = FALSE, ...) { ff <- eval(substitute(f), x, parent.frame()) lapply(split(seq_len(nrow(x)), ff, drop = drop, ...), function(ind) x[ind, , drop = FALSE]) } df <- data.frame(x =

Re: [Rd] silly SVN question

2009-12-15 Thread Romain Francois
Maybe you are looking for ./tools/rsync-recommended I think only the base set of packages (lower priority than recommended) are in src/library. > packageDescription( "utils" )[["Priority"]] [1] "base" > packageDescription( "Matrix" )[["Priority"]] [1] "recommended" Romain On 12/15/2009 05:14

Re: [Rd] silly SVN question

2009-12-15 Thread Ben Bolker
thanks! Prof Brian Ripley wrote: > On Tue, 15 Dec 2009, Ben Bolker wrote: > >> I followed the suggestions at >> http://developer.r-project.org/SVNtips.html to check out an anonymous >> copy of the development branch of R, but so far I have been unable to >> figure out an analogous way to track

Re: [Rd] silly SVN question

2009-12-15 Thread Prof Brian Ripley
On Tue, 15 Dec 2009, Ben Bolker wrote: I followed the suggestions at http://developer.r-project.org/SVNtips.html to check out an anonymous copy of the development branch of R, but so far I have been unable to figure out an analogous way to track the development branch of the recommended packag

Re: [Rd] silly SVN question

2009-12-15 Thread Ben Bolker
Yes, but ... on my system at least the Recommended folder has a recent version of the Makefile, but the packages are old tarballs. I have a fuzzy memory that I needed to download the packages from somewhere else to build a complete/up-to-date version, but I have forgotten where I read that. An

Re: [Rd] Antwort: Re: R on Windows crashes when using certain

2009-12-15 Thread Prof Brian Ripley
A few comments, though (I've been offline through much of this, and away from a Windows machine for almost all). 1) You could have narrowed down the cause by saving and restarting the session. In particular it would have shown that the issue was not in sub() as you reported, since saving the

Re: [Rd] silly SVN question

2009-12-15 Thread Kasper Daniel Hansen
The obvious: the recommended packages are inside src/library Kasper On Dec 15, 2009, at 10:57 AM, Ben Bolker wrote: > > I followed the suggestions at > http://developer.r-project.org/SVNtips.html to check out an anonymous > copy of the development branch of R, but so far I have been unable t

[Rd] silly SVN question

2009-12-15 Thread Ben Bolker
I followed the suggestions at http://developer.r-project.org/SVNtips.html to check out an anonymous copy of the development branch of R, but so far I have been unable to figure out an analogous way to track the development branch of the recommended packages. (I'm assuming they actually live some

Re: [Rd] S4 dispatch and S3 "connection" objects

2009-12-15 Thread Michael Lawrence
On Mon, Dec 14, 2009 at 11:36 PM, Romain Francois < romain.franc...@dbmail.com> wrote: > Hello, > > I'm trying to get S4 dispatch on S3 "connection" objects. > > So I do : > > setOldClass( "connection" ) > > and then : > > setGeneric( "bling", function(object) standardGeneric( "bling" ) ) > setMet

[Rd] Antwort: Re: R on Windows crashes when using certain (PR#14143)

2009-12-15 Thread g . russell
The new version of R-devel from yesterday morning seems to have fixed bug=20 14114! Thanks a lot for your help. Duncan Murdoch schrieb am 14.12.2009 13:34:35: > On 10/12/2009 4:20 AM, k...@huftis.org wrote: > > Full=5FName: Karl Ove Hufthammer > > Version: 2.10.0 > > OS: Windows XP > > Submissio

Re: [Rd] RFC: lchoose() vs lfactorial() etc

2009-12-15 Thread Martin Maechler
> "PS" == Petr Savicky > on Tue, 15 Dec 2009 10:52:43 +0100 writes: PS> On Tue, Dec 15, 2009 at 09:49:28AM +0100, Martin Maechler wrote: >> lgamma(x) and lfactorial(x) are defined to return >> >> ln|Gamma(x)| {= log(abs(gamma(x)))} or ln|Gamma(x+1)| respectively.

Re: [Rd] RFC: lchoose() vs lfactorial() etc

2009-12-15 Thread Robin Hankin
Martin Becker wrote: Robin Hankin wrote: ... Is this the place to discuss having complex arguments for gamma()? ... If this discussion starts I would second the wish for the functionality of gsl's lngamma_complex in base R. Do you mean gsl or GSL? ;-) [the GNU scientific library is 'GSL'

Re: [Rd] RFC: lchoose() vs lfactorial() etc

2009-12-15 Thread Martin Becker
Robin Hankin wrote: ... Is this the place to discuss having complex arguments for gamma()? ... If this discussion starts I would second the wish for the functionality of gsl's lngamma_complex in base R. Best wishes Martin -- Dr. Martin Becker Statistics and Econometrics Saarland University

Re: [Rd] RFC: lchoose() vs lfactorial() etc

2009-12-15 Thread Petr Savicky
On Tue, Dec 15, 2009 at 09:49:28AM +0100, Martin Maechler wrote: > lgamma(x) and lfactorial(x) are defined to return > > ln|Gamma(x)| {= log(abs(gamma(x)))} or ln|Gamma(x+1)| respectively. > > Unfortunately, we haven't chosen the analogous definition for > lchoose(). > > So, currently > >

Re: [Rd] RFC: lchoose() vs lfactorial() etc

2009-12-15 Thread Robin Hankin
Hi Martin I think you're absolutely right about this; One thing I need again and again is a multinomial function, and usually define: > lmultinomial function (x) { lfactorial(sum(x)) - sum(lfactorial(x)) } > multinomial function (x) { exp(lmultinomial(x)) } It would be nice to have this

[Rd] split.data.frame

2009-12-15 Thread Romain Francois
Hello, I very much enjoy "with" and "subset" semantics for data frames and was wondering if we could have something similar with split, basically by evaluating the second argument "with" the data frame : split.data.frame function(x, f, drop = FALSE, ...){ call <- match.call( )

[Rd] RFC: lchoose() vs lfactorial() etc

2009-12-15 Thread Martin Maechler
lgamma(x) and lfactorial(x) are defined to return ln|Gamma(x)| {= log(abs(gamma(x)))} or ln|Gamma(x+1)| respectively. Unfortunately, we haven't chosen the analogous definition for lchoose(). So, currently > lchoose(1/2, 1:10) [1] -0.6931472 -2.0794415NaN -3.2425924NaN