[Rd] Detecting bad lexical scoping

2011-03-17 Thread Ryan King
I've recently hunted down a troublesome bug in my own code, and am looking for an easy mechanism to detect this kind of error in other R code. The problem was an undefined variable inside of a function. Unfortunately, R looked for that variable in the global environment and found it since there

Re: [Rd] Detecting bad lexical scoping

2011-03-17 Thread Duncan Murdoch
On 16/03/2011 4:14 PM, Ryan King wrote: I've recently hunted down a troublesome bug in my own code, and am looking for an easy mechanism to detect this kind of error in other R code. The problem was an undefined variable inside of a function. Unfortunately, R looked for that variable in the

Re: [Rd] Feature request: display file name in R CMD check warning

2011-03-17 Thread Duncan Murdoch
On 16/03/2011 7:55 PM, Dan Tenenbaum wrote: Hi, I came across the following warning in R CMD check (it only occurred on Windows): The \usage entries for S3 methods should use the \method markup and not their full name. See the chapter 'Writing R documentation files' in manual 'Writing R

Re: [Rd] Feature request: display file name in R CMD check warning

2011-03-17 Thread Duncan Murdoch
On 16/03/2011 7:55 PM, Dan Tenenbaum wrote: Hi, I came across the following warning in R CMD check (it only occurred on Windows): The \usage entries for S3 methods should use the \method markup and not their full name. See the chapter 'Writing R documentation files' in manual 'Writing R

Re: [Rd] Detecting bad lexical scoping

2011-03-17 Thread Gabor Grothendieck
On Wed, Mar 16, 2011 at 4:14 PM, Ryan King c.ryan.k...@gmail.com wrote: I've recently hunted down a troublesome bug in my own code, and am looking for an easy mechanism to detect this kind of error in other R code.  The problem was an undefined variable inside of a function. Unfortunately, R

Re: [Rd] Standardized Pearson residuals (and score tests)

2011-03-17 Thread peter dalgaard
On Mar 16, 2011, at 23:29 , Gordon K Smyth wrote: Hi Peter and others, If it helps, I wrote a small function glm.scoretest() for the statmod package on CRAN to compute score tests from glm fits. The score test for adding a covariate, or any set of covariates, can be extracted very

[Rd] New feature for download.packages(): optional resolution of package dependencies

2011-03-17 Thread Dr. Peter Ruckdeschel
Hi r-devels, may I ask for an enhancement for download.packages() to optionally resolve package dependencies similarly to the respective functionality in install.packages() ? This would be a major help in compiling a large number of packages (e.g. by means of download.view() from pkg ctv) for

Re: [Rd] Standardized Pearson residuals

2011-03-17 Thread peter dalgaard
On Mar 16, 2011, at 23:34 , John Maindonald wrote: One can easily test for the binary case and not give the statistic in that case. Warning if expected cell counts 5 would be another possibility. A general point is that if one gave no output that was not open to abuse, there'd be

Re: [Rd] Standardized Pearson residuals

2011-03-17 Thread Martin Maechler
peter dalgaard pda...@gmail.com on Thu, 17 Mar 2011 15:45:01 +0100 writes: On Mar 16, 2011, at 23:34 , John Maindonald wrote: One can easily test for the binary case and not give the statistic in that case. Warning if expected cell counts 5 would be another

Re: [Rd] New feature for download.packages(): optional resolution of package dependencies

2011-03-17 Thread Simon Urbanek
On Mar 17, 2011, at 10:26 AM, Dr. Peter Ruckdeschel wrote: Hi r-devels, may I ask for an enhancement for download.packages() to optionally resolve package dependencies similarly to the respective functionality in install.packages() ? This would be a major help in compiling a large

Re: [Rd] Feature request: display file name in R CMD check warning

2011-03-17 Thread Dan Tenenbaum
On Thu, Mar 17, 2011 at 2:36 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 16/03/2011 7:55 PM, Dan Tenenbaum wrote: Hi, I came across the following warning in R CMD check (it only occurred on Windows): The \usage entries for S3 methods should use the \method markup and not their

Re: [Rd] Feature request: display file name in R CMD check warning

2011-03-17 Thread Dan Tenenbaum
On Thu, Mar 17, 2011 at 9:33 AM, Dan Tenenbaum dtene...@fhcrc.org wrote: On Thu, Mar 17, 2011 at 2:36 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 16/03/2011 7:55 PM, Dan Tenenbaum wrote: Hi, I came across the following warning in R CMD check (it only occurred on Windows): The

Re: [Rd] Standardized Pearson residuals

2011-03-17 Thread peter dalgaard
On Mar 17, 2011, at 16:14 , Martin Maechler wrote: peter dalgaard pda...@gmail.com on Thu, 17 Mar 2011 15:45:01 +0100 writes: Back to the original question: The current rstandard() code reads ## FIXME ! -- make sure we are following the literature: rstandard.glm -

Re: [Rd] Standardized Pearson residuals

2011-03-17 Thread John Fox
Dear Peter and Martin, On Thu, 17 Mar 2011 18:08:18 +0100 peter dalgaard pda...@gmail.com wrote: On Mar 17, 2011, at 16:14 , Martin Maechler wrote: peter dalgaard pda...@gmail.com on Thu, 17 Mar 2011 15:45:01 +0100 writes: Back to the original question: The current

Re: [Rd] Standardized Pearson residuals

2011-03-17 Thread Brett Presnell
John Maindonald john.maindon...@anu.edu.au writes: One can easily test for the binary case and not give the statistic in that case. A general point is that if one gave no output that was not open to abuse, there'd be nothing given at all! Thanks John. I've been reluctant to push too hard

Re: [Rd] Standardized Pearson residuals (and score tests)

2011-03-17 Thread Gordon K Smyth
On Thu, 17 Mar 2011, peter dalgaard wrote: On Mar 16, 2011, at 23:29 , Gordon K Smyth wrote: Hi Peter and others, If it helps, I wrote a small function glm.scoretest() for the statmod package on CRAN to compute score tests from glm fits. The score test for adding a covariate, or any set

Re: [Rd] Feature request: display file name in R CMD check warning

2011-03-17 Thread Duncan Murdoch
On 11-03-17 12:33 PM, Dan Tenenbaum wrote: On Thu, Mar 17, 2011 at 2:36 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 16/03/2011 7:55 PM, Dan Tenenbaum wrote: Hi, I came across the following warning in R CMD check (it only occurred on Windows): The \usage entries for S3 methods

Re: [Rd] avoid copying big object passed into optimize()

2011-03-17 Thread Zepu Zhang
Thanks! I found, say, exp(x) causes 2 duplications whereas sum(x) 0 duplication. Is there any document to learn from about this? (first time list user. sorry if anything about the posting procedure is wrong) On Wed, Mar 9, 2011 at 6:16 PM, Matt Shotwell m...@biostatmatt.com wrote: On Wed,