[Rd] bounties

2007-05-09 Thread Ben Bolker
Has anyone considered a bounty system for R? (i.e., some kind of system whereby users could put up money to request particular improvements/bits of R code. These bits of R code need not be incorporated into base R unless they're deemed sufficiently useful, but they could go (e.g.) on the Wiki)

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 Messag

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

2007-05-09 Thread Greg Snow
The vcov function in package stats is already a generic, could you write your methods for vcov rather than for var? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mai

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] 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

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

2007-05-09 Thread Prof Brian Ripley
On Wed, 9 May 2007, John Fox wrote: > Dear r-devel list members, > > I stumbled across the following behaviour of read.table() recently: Suppose > that I have the data > > a " " "" > "" "" "" > > in a file or copied to the clipboard, and issue the command > >> DF <- read.table("clipboard") >> D

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

2007-05-09 Thread Jeffrey J. Hallman
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 wrong for v

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

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

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

[Rd] Behaviour of read.table with empty columns

2007-05-09 Thread John Fox
Dear r-devel list members, I stumbled across the following behaviour of read.table() recently: Suppose that I have the data a " " "" "" "" "" in a file or copied to the clipboard, and issue the command > DF <- read.table("clipboard") > DF V1 V2 V3 1 a NA NA 2NA NA > is.na(DF)

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 wort

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

[Rd] Duplicate assignment in function newbzfile on R-trunk

2007-05-09 Thread Jeffrey Horner
There's a duplicated assignment to new->fgetc in function newbzfile: Index: src/main/connections.c === --- src/main/connections.c (revision 41502) +++ src/main/connections.c (working copy) @@ -1311,7 +1311,6 @@ new->vf

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 a

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 200

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 na

[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 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

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

[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 gene

[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", cut.string(deparse(as.vector(form