Re: [Rd] A problem with glm() and possibly model-using functions in general?

2005-11-18 Thread Byron Ellis
On Nov 18, 2005, at 4:35 PM, Thomas Lumley wrote: > On Fri, 18 Nov 2005, Byron Ellis wrote: > >> So, consider the following: >> >>> example(glm) >>> g = function(model) { w = runif(9);glm(model,weights=w); } >>> g(counts ~ outcome + treatment) >> Error in eval(expr, envir, enclos) : object "w" no

Re: [Rd] A problem with glm() and possibly model-using functions in general?

2005-11-18 Thread Thomas Lumley
On Fri, 18 Nov 2005, Byron Ellis wrote: > So, consider the following: > > > example(glm) > > g = function(model) { w = runif(9);glm(model,weights=w); } > > g(counts ~ outcome + treatment) > Error in eval(expr, envir, enclos) : object "w" not found > > Huh?! I suspect that somebody is lazily evalua

Re: [Rd] problem with \eqn (PR#8322)

2005-11-18 Thread Kurt Hornik
> Duncan Murdoch writes: > On 11/18/2005 12:40 PM, Hin-Tak Leung wrote: >> Martin Maechler wrote: >> "Hin-Tak" == Hin-Tak Leung <[EMAIL PROTECTED]> on Fri, 18 Nov 2005 16:38:28 + writes: >>> >>> Hin-Tak> Your own fault. See below. It is basic LaTeX and any LaTeX person

[Rd] A problem with glm() and possibly model-using functions in general?

2005-11-18 Thread Byron Ellis
So, consider the following: > example(glm) > g = function(model) { w = runif(9);glm(model,weights=w); } > g(counts ~ outcome + treatment) Error in eval(expr, envir, enclos) : object "w" not found Huh?! I suspect that somebody is lazily evaluating arguments in the wrong environment (probably

[Rd] challenge: using 'subset = ' inside function ..

2005-11-18 Thread Martin Maechler
I've been asked by someone else whom I originally taught `` to just work with substitute() and then all will be fine'' ... But it looks to me that I've been caught here. Is it possible to make this work along the way we thought it should? 1) Inside a function, say tst() with the 'formula' and

Re: [Rd] problem with \eqn (PR#8322)

2005-11-18 Thread Uwe Ligges
Hin-Tak Leung wrote: > Martin Maechler wrote: > >>>"Hin-Tak" == Hin-Tak Leung <[EMAIL PROTECTED]> >>> on Fri, 18 Nov 2005 16:38:28 + writes: >> >> >>Hin-Tak> Your own fault. See below. It is basic LaTeX and any LaTeX person >>Hin-Tak> can tell you the answer...(most probably

[Rd] minor suggestion for optim documentation

2005-11-18 Thread Ben Bolker
consider adding the following clause to the optim documentation describing SANN? I had to go look this up in the optim.c code for a student who is not proficient in C, and it may be simple enough to include it in the documentation. (This replaces the existing sentence that ends where the semi

Re: [Rd] problem with \eqn (PR#8322)

2005-11-18 Thread Duncan Murdoch
On 11/18/2005 12:40 PM, Hin-Tak Leung wrote: > Martin Maechler wrote: > >>>"Hin-Tak" == Hin-Tak Leung <[EMAIL PROTECTED]> >>> on Fri, 18 Nov 2005 16:38:28 + writes: >> >> >>Hin-Tak> Your own fault. See below. It is basic LaTeX and any LaTeX person >>Hin-Tak> can tell you the

Re: [Rd] problem with \eqn (PR#8322)

2005-11-18 Thread hin-tak . leung
Martin Maechler wrote: >>"Hin-Tak" == Hin-Tak Leung <[EMAIL PROTECTED]> >>on Fri, 18 Nov 2005 16:38:28 + writes: > > > Hin-Tak> Your own fault. See below. It is basic LaTeX and any LaTeX person > Hin-Tak> can tell you the answer...(most probably haven't bothered...) > > N

Re: [Rd] problem with \eqn (PR#8322)

2005-11-18 Thread Hin-Tak Leung
Martin Maechler wrote: >>"Hin-Tak" == Hin-Tak Leung <[EMAIL PROTECTED]> >>on Fri, 18 Nov 2005 16:38:28 + writes: > > > Hin-Tak> Your own fault. See below. It is basic LaTeX and any LaTeX person > Hin-Tak> can tell you the answer...(most probably haven't bothered...) > > N

Re: [Rd] problem with \eqn (PR#8322)

2005-11-18 Thread Ross Boylan
I put a response into the bug tracker, but I don't think it took. So I'm sending this; apologies if it's a duplicate. On Fri, Nov 18, 2005 at 04:38:28PM +, Hin-Tak Leung wrote: > Your own fault. Not on the evidence you presented. line 1.7 below is in error, but that's not my input. My inp

Re: [Rd] problem with \eqn (PR#8322)

2005-11-18 Thread maechler
> "Hin-Tak" == Hin-Tak Leung <[EMAIL PROTECTED]> > on Fri, 18 Nov 2005 16:38:28 + writes: Hin-Tak> Your own fault. See below. It is basic LaTeX and any LaTeX person Hin-Tak> can tell you the answer...(most probably haven't bothered...) No. Whereas I partly agree that it's

Re: [Rd] using a factor as col argument in plot:

2005-11-18 Thread Prof Brian Ripley
On Fri, 18 Nov 2005, Christoph Buser wrote: > Dear R core team and R-devel-listers. > Using the following code produces an empty plot (similar > to col = NA): > >> plot(1:9, col = factor(rep(1:3,3), labels = c("red", "blue", "black"))) > > > My question: Shouldn't one get at least a warning (or

[Rd] using a factor as col argument in plot:

2005-11-18 Thread Christoph Buser
Dear R core team Using the following code produces an empty plot (similar to col = NA): > plot(1:9, col = factor(rep(1:3,3), labels = c("red", "blue", "black"))) My question: Shouldn't one get at least a warning (or an error) if one tries to use a factor as col argument? Thanks

Re: [Rd] problem with \eqn (PR#8322)

2005-11-18 Thread Hin-Tak Leung
Your own fault. See below. It is basic LaTeX and any LaTeX person can tell you the answer...(most probably haven't bothered...) [EMAIL PROTECTED] wrote: > Full_Name: Ross Boylan > Version: 2.2.0 > OS: Linux > Submission from: (NULL) (65.175.48.58) > > > \eqn{{\bf\beta}_j}{b(j)} in my .Rd file

Re: [Rd] Image display in R

2005-11-18 Thread Duncan Murdoch
On 11/18/2005 10:22 AM, Vasundhara Akkineni wrote: > Hi all, > I am trying to display a matrix of plots(images), for example a 3*3 matrix > of 9 image plots, such that when a user clicks on a image i can show the > enlarged plot. I tried the multiple graphic device(using mfcol=c(3,3) and > mfg), b

[Rd] Image display in R

2005-11-18 Thread Vasundhara Akkineni
Hi all, I am trying to display a matrix of plots(images), for example a 3*3 matrix of 9 image plots, such that when a user clicks on a image i can show the enlarged plot. I tried the multiple graphic device(using mfcol=c(3,3) and mfg), but it creates multiple plots in a single image file. So, i wo

Re: [Rd] pr[in]comp: predict single observation when data has colnames (PR#8325)

2005-11-18 Thread murdoch
On 11/18/2005 7:04 AM, [EMAIL PROTECTED] wrote: > To my knowledge, this has not been reported previously, and doesn't > seem to have been changed in R-devel or R-patched. > > If M is a matrix with coloumn names, and > > mod <- prcomp(M) # or princomp > > then predicting a single observation (ro

Re: [Rd] pr[in]comp: predict single observation when data has colnames (PR#8324)

2005-11-18 Thread Duncan Murdoch
On 11/18/2005 7:04 AM, [EMAIL PROTECTED] wrote: > To my knowledge, this has not been reported previously, and doesn't > seem to have been changed in R-devel or R-patched. > > If M is a matrix with coloumn names, and > > mod <- prcomp(M) # or princomp > > then predicting a single observation (ro

[Rd] pr[in]comp: predict single observation when data has colnames (PR#8324)

2005-11-18 Thread bhx5
To my knowledge, this has not been reported previously, and doesn't seem to have been changed in R-devel or R-patched. If M is a matrix with coloumn names, and mod <- prcomp(M) # or princomp then predicting a single observation (row) with predict() gives the error Error in scale.default(newdat

Re: [Rd] Matrix (PR#8321)

2005-11-18 Thread Uwe Ligges
P Ehlers wrote: > Actually, my guess about PACKAGES was wrong. I just removed Matrix > and re-installed Matrix_0.99-2 (Rgui: Packages menu) from CRAN and > had no problems. The outdated Matrix version will disappear from CRAN master within 24 hours. Two versions in the repository do not cause a