Re: [Rd] S4 classes in existing packages

2005-10-31 Thread Seth Falcon
On 31 Oct 2005, [EMAIL PROTECTED] wrote: > I'm interested in looking at some examples of existing R packages > that rely heavily on S4 classes to get a feel for varying styles and > package organization techniques. Could you recommend any packages > that might serve as a good starting point? I wo

[Rd] S4 classes in existing packages

2005-10-31 Thread Jeff Enos
R-devel, I'm interested in looking at some examples of existing R packages that rely heavily on S4 classes to get a feel for varying styles and package organization techniques. Could you recommend any packages that might serve as a good starting point? Thanks in advance, Jeff _

[Rd] Minor typos with UseMethod docs (PR#8269)

2005-10-31 Thread mikek
Full_Name: Mike Kay Version: R-patched OS: Linux Submission from: (NULL) (137.75.70.37) Hi, The following patch cleans up some grammar in the docs for UseMethod (library/base/help/UseMethod) -mike --- UseMethod 2005-09-28 20:06:39.0 + +++ /tmp/UseMethod 2005-10-31 21:21:05.5

Re: [Rd] [R] unvectorized option for outer()

2005-10-31 Thread Duncan Murdoch
Here's my entry for Vectorize: Vectorize <- function(FUN, vectorize.args = names(fargs)) { fargs <- formals(FUN) dovec <- match(vectorize.args, names(fargs)) FUNV <- function() { # will set the formals below args <- as.list(match.call())[-1] args <- lapply(arg

Re: [Rd] [R] unvectorized option for outer()

2005-10-31 Thread Tony Plate
Duncan Murdoch wrote: > On 10/31/2005 2:15 PM, Tony Plate wrote: > >> [snipped comments irrelevant to this post] >> >> So, here's a first pass at a general Vectorize() function: >> >> Vectorize <- function(FUN, vectorize.args) { >> if (!all(is.element(vectorize.args, names(formals(FUN) >>

Re: [Rd] [R] unvectorized option for outer()

2005-10-31 Thread Duncan Murdoch
On 10/31/2005 2:33 PM, Gabor Grothendieck wrote: > On 10/31/05, Tony Plate <[EMAIL PROTECTED]> wrote: >> >> I have to confess I don't really understand how environments work with >> functions, so I don't know if this Vectorize() function will work in >> general. What is the appropriate environment

Re: [Rd] [R] unvectorized option for outer()

2005-10-31 Thread Duncan Murdoch
On 10/31/2005 2:15 PM, Tony Plate wrote: > When I read the preface to The Blue Book (The New S Language, Becker, > Chambers & Wilks) I see comments along the lines of "high-level > language", "primary goal of the S environment is to enable and encourage > good data analysis", etc. While vectori

Re: [Rd] [R] unvectorized option for outer()

2005-10-31 Thread Thomas Lumley
On Mon, 31 Oct 2005, Liaw, Andy wrote: >> From: Thomas Lumley >> >> On Sun, 30 Oct 2005, Jonathan Rougier wrote: >> >>> I'm not sure about this. Perhaps I am a dinosaur, but my feeling is >>> that if people are writing functions in R that might be subject to >>> simple operations like outer produ

Re: [Rd] [R] unvectorized option for outer()

2005-10-31 Thread Gabor Grothendieck
On 10/31/05, Tony Plate <[EMAIL PROTECTED]> wrote: > > I have to confess I don't really understand how environments work with > functions, so I don't know if this Vectorize() function will work in > general. What is the appropriate environment for returned value of > Vectorize()? Is this approach

Re: [Rd] [R] unvectorized option for outer()

2005-10-31 Thread Tony Plate
When I read the preface to The Blue Book (The New S Language, Becker, Chambers & Wilks) I see comments along the lines of "high-level language", "primary goal of the S environment is to enable and encourage good data analysis", etc. While vectorization is a great feature of S (and R), I don't

Re: [Rd] Yates' correction for continuity in chisq.test (PR#8265)

2005-10-31 Thread ehlers
Prof Brian Ripley wrote: > On Sun, 30 Oct 2005, P Ehlers wrote: > >> [EMAIL PROTECTED] wrote: >> >>> Full_Name: foo ba baz >>> Version: R2.2.0 >>> OS: Mac OS X (10.4) >>> Submission from: (NULL) (219.66.32.183) >>> >>> >>> chisq.test(matrix(c(9,10,9,11),2,2)) >>> >>> Chi-square value must be 0,

Re: [Rd] [R] unvectorized option for outer()

2005-10-31 Thread Liaw, Andy
> From: Thomas Lumley > > On Sun, 30 Oct 2005, Jonathan Rougier wrote: > > > I'm not sure about this. Perhaps I am a dinosaur, but my feeling is > > that if people are writing functions in R that might be subject to > > simple operations like outer products, then they ought to be writing > > vec

Re: [Rd] Yates' correction for continuity in chisq.test (PR#8265)

2005-10-31 Thread ripley
On Sun, 30 Oct 2005, P Ehlers wrote: > [EMAIL PROTECTED] wrote: >> Full_Name: foo ba baz >> Version: R2.2.0 >> OS: Mac OS X (10.4) >> Submission from: (NULL) (219.66.32.183) >> >> >> chisq.test(matrix(c(9,10,9,11),2,2)) >> >> Chi-square value must be 0, and, P value must be 0 >> R does over correc