Re: [Rd] Guidelines for S3 regression models

2015-06-30 Thread Stephen Milborrow
to the Venables and Ripley S programming book. On 26.06.2015 14:09, Stephen Milborrow wrote: Once we have built a regression model, we typically want to use the model for further processing, such as making predictions from the model or plotting the residuals. Unfortunately, for many packages on CRAN

Re: [Rd] legitimate use of :::

2013-08-23 Thread Stephen Milborrow
To avoid the NOTEs (which often triggers a 'pls fix' upon submission to CRAN), I simply copied/pasted these functions to my package, but this seems wasteful. An issue is how one acknowledges the author of the cut and pasted code. Assume that for one reason or another the original function

Re: [Rd] 0 ^ NaN == Inf, why?

2008-10-26 Thread Stephen Milborrow
of incompatiblities between R math and IEEE 754, if people think time spent doing that is worth it. Steve www.milbo.users.sonic.net - Original Message - From: John Chambers [EMAIL PROTECTED] To: Stephen Milborrow [EMAIL PROTECTED] Cc: r-devel@r-project.org Sent: Saturday, October 25, 2008 7

[Rd] 0 ^ NaN == Inf, why?

2008-10-25 Thread Stephen Milborrow
In R, 0 ^ NaN yields Inf. I would have expected NaN or perhaps 0. Is this behaviour intended? sessionInfo() R version 2.8.0 (2008-10-20) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United

Re: [Rd] HOW TO AVOID LOOPS

2008-04-14 Thread Stephen Milborrow
# code is shown above, 7 secs with standard R 2.6.2 Stephen Milborrow www.milbo.users.sonic.net # cm-post.R: compare solutions to the following post to #r-devel from carlos martinez 12 apr 2008: # Looking for a simple, effective a minimum execution time solution. # For a vector as: # c

[Rd] Just-in-time compiler for R

2008-04-04 Thread Stephen Milborrow
There is a new version of the just-in-time compiler for R at www.milbo.users.sonic.net/ra/index.html With just-in-time compilation enabled, the convolution example from the Extending R manual now runs about 30 times faster. The web page has more information. Stephen Milborrow

Re: [Rd] gctorture and proc.time (PR#10600)

2008-01-22 Thread Stephen Milborrow
I'm not sure if this is connected but in R2.6.1 do_proctime is missing some PROTECTs. The current code is SEXP ans = allocVector(REALSXP, 5), nm = allocVector(STRSXP, 5); and should be SEXP ans, nm; PROTECT(ans = allocVector(REALSXP, 5)); PROTECT(nm = allocVector(STRSXP, 5)); A

[Rd] Just-in-time compiler for R

2008-01-16 Thread Stephen Milborrow
] + a[i] * b[j] The loop will run about 30% faster. That's not much of a speedup, but the code is still in early development and the figure will get much better. If you are interested there is more information at www.milbo.users.sonic.net/ra. Stephen Milborrow www.milbo.users.sonic.net

[Rd] Modifying R_CheckStack for a speed increase

2007-08-29 Thread Stephen Milborrow
Greetings R developers, R will run a little faster when executing pure R code if the function R_CheckStack() is modified. With the modification, the following code for example runs 15% faster (compared to a virgin R-2.5.1 on my Windows XP machine): N = 1e7 foo - function(x) {