[Rd] Do NOT misuse R-devel! {was Median}

2007-05-09 Thread Martin Maechler
Please, Jose, do NOT misuse R-devel for such questions! There's R-help (and many good books on R and maybe your local R expert) for asking such questions. Definitely *not* the R-devel mailing list. -- http://www.R-project.org/mail.html , the posting guide, etc. Martin Maechler, ETH Zurich

[Rd] step() in sink() and Sweave()

2007-05-09 Thread Jari Oksanen
Dear developers, I just noticed that step() function currently prints the current model using message(), but the resulting model using print(). The relevant commands within the step() body are: if (trace) message(Start: AIC=, format(round(bAIC, 2)), \n,

[Rd] One for the wish list - var.default etc

2007-05-09 Thread S Ellison
I was working on a permutation-like variant of the bootstrap for smaller samples, and wanted to be able to get summary stats of my estimator conveniently. mean() is OK as its a generic, so a mean.oddboot function gets used automatically. But var, sd and others are not originally written as

Re: [Rd] One for the wish list - var.default etc

2007-05-09 Thread Prof Brian Ripley
On Wed, 9 May 2007, S Ellison wrote: I was working on a permutation-like variant of the bootstrap for smaller samples, and wanted to be able to get summary stats of my estimator conveniently. mean() is OK as its a generic, so a mean.oddboot function gets used automatically. But var, sd and

Re: [Rd] One for the wish list - var.default etc

2007-05-09 Thread S Ellison
Brian, If we make functions generic, we rely on package writers implementing the documented semantics (and that is not easy to check). That was deemed to be too easy to get wrong for var(). Hard to argue with a considered decision, but the alternative facing increasing numbers of package

[Rd] fix() changes the class of mts objects

2007-05-09 Thread Simone Giannerini
Dear all, it looks like fix() changes the class of mts objects, here is a reproducible example (tested both on WinXP and Linux): x - ts(cbind(1:5,1:5)) x Time Series: Start = 1 End = 5 Frequency = 1 Series 1 Series 2 111 222 333 44

Re: [Rd] One for the wish list - var.default etc

2007-05-09 Thread Gabor Grothendieck
I agree that wider use of generics in the core of R is desirable as it facilitates designs in various addon packages that are much easier to use. In the absence of generics, the addon package either has to clobber/mask the version in the core, which really is unacceptable, or define a different

Re: [Rd] fix() changes the class of mts objects

2007-05-09 Thread Prof Brian Ripley
Why did you expect otherwise?: fix() is treating it as matrix and ?edit.matrix says that it only works on 'simple data frames' (and converts matrices to such). Editing R objects can easily change aspects of them, as dput() is not faithful, environments can get lost and so on. On Wed, 9 May

Re: [Rd] One for the wish list - var.default etc

2007-05-09 Thread Prof Brian Ripley
On Wed, 9 May 2007, S Ellison wrote: Brian, If we make functions generic, we rely on package writers implementing the documented semantics (and that is not easy to check). That was deemed to be too easy to get wrong for var(). Hard to argue with a considered decision, but the

Re: [Rd] fix() changes the class of mts objects

2007-05-09 Thread Prof Brian Ripley
On Wed, 9 May 2007, Simone Giannerini wrote: My concern here is that users can be confused from the fact that if one has a single time series fix() uses the default method of edit() and does not change its class x - ts(1:5) fix(x) class(x) [1] ts whereas for mts objects edit.data.frame

Re: [Rd] fix() changes the class of mts objects

2007-05-09 Thread Simone Giannerini
My concern here is that users can be confused from the fact that if one has a single time series fix() uses the default method of edit() and does not change its class x - ts(1:5) fix(x) class(x) [1] ts whereas for mts objects edit.data.frame is used so that in my opinion it might be worth to

Re: [Rd] fix() changes the class of mts objects

2007-05-09 Thread Simone Giannerini
I think that a simple statement mentioning the issue in the documentation of fix() would be helpful. regards Simone On 5/9/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Wed, 9 May 2007, Simone Giannerini wrote: My concern here is that users can be confused from the fact that if one

Re: [Rd] fix() changes the class of mts objects

2007-05-09 Thread Jeffrey J. Hallman
Simone Giannerini [EMAIL PROTECTED] writes: My concern here is that users can be confused from the fact that if one has a single time series fix() uses the default method of edit() and does not change its class x - ts(1:5) fix(x) class(x) [1] ts whereas for mts objects

Re: [Rd] Behaviour of read.table with empty columns

2007-05-09 Thread Gabor Grothendieck
Perhaps this has to do with the fact that there is not enough information available to establish the class of those columns. For example, try this: read.table(clipboard, colClasses = character) On 5/9/07, John Fox [EMAIL PROTECTED] wrote: Dear r-devel list members, I stumbled across the

Re: [Rd] One for the wish list - var.default etc

2007-05-09 Thread Robert Gentleman
Jeffrey J. Hallman wrote: Prof Brian Ripley [EMAIL PROTECTED] writes: On Wed, 9 May 2007, S Ellison wrote: Brian, If we make functions generic, we rely on package writers implementing the documented semantics (and that is not easy to check). That was deemed to be too easy to get

Re: [Rd] One for the wish list - var.default etc

2007-05-09 Thread Gabor Grothendieck
The generics don't have to be S4. In fact, in many cases it would be better to have them be S3 for consistency with other similar generics in the core of R. Or I wonder about the possibility of having generics which can have some methods being of S3 and others of S4. On 5/9/07, Robert Gentleman

Re: [Rd] Behaviour of read.table with empty columns

2007-05-09 Thread John Fox
Dear Brian (and Gabor), Thanks -- that makes sense. John John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox -Original