[Rd] question about Makeconf and nvcc/CUDA

2013-07-17 Thread Hodgess, Erin
Dear R development: I'm not sure if this is the appropriate list, but it's a start. I would like to put together a package which contains a CUDA program on Windows 7. I believe that it has to do with the Makeconf file in the etc directory. But when I just use the nvcc with the shared opt

Re: [Rd] On the mechanics of function evaluation and argument matching

2013-07-17 Thread Brian Rowe
I agree that failing fast is a good principle. My initial point led the other way though, i.e. any unmatched formal arguments without default values should be handled in one of two ways: 1. Fail the function call. This is what most non-functional languages do e.g. Python >>> def f(x,y,z): x ...

Re: [Rd] On the mechanics of function evaluation and argument matching

2013-07-17 Thread Peter Meilstrup
On Wed, Jul 17, 2013 at 10:20 AM, Ben Bolker wrote: > Brian Rowe muxspace.com> writes: > > > > > Thanks for the lead. Given the example in ?missing though, > > wouldn't it be safer to explicitly define a > > default value of NULL: > > > > myplot <- function(x, y=NULL) { > > if(is.null(y)) { >

Re: [Rd] Problem following an R bug fix to integrate()

2013-07-17 Thread Martyn Plummer
On Tue, 2013-07-16 at 13:55 +0200, Hans W Borchers wrote: > I have been told by the CRAN administrators that the following code generated > an error on 64-bit Fedora Linux (gcc, clang) and on Solaris machines (sparc, > x86), but runs well on all other systems): > > > fn <- function(x, y) ifels

Re: [Rd] On the mechanics of function evaluation and argument matching

2013-07-17 Thread Ben Bolker
Brian Rowe muxspace.com> writes: > > Thanks for the lead. Given the example in ?missing though, > wouldn't it be safer to explicitly define a > default value of NULL: > > myplot <- function(x, y=NULL) { > if(is.null(y)) { > y <- x > x <- 1:length(y) > } > plot(x, y) > } > [sni

Re: [Rd] On the mechanics of function evaluation and argument matching

2013-07-17 Thread Brian Rowe
Thanks for the lead. Given the example in ?missing though, wouldn't it be safer to explicitly define a default value of NULL: myplot <- function(x, y=NULL) { if(is.null(y)) { y <- x x <- 1:length(y) } plot(x, y) } On Jul 17, 2013, at 11:05 AM, "R. Michael Weylandt" wrote: > On

[Rd] On the mechanics of function evaluation and argument matching

2013-07-17 Thread Brian Rowe
Hello, Section 4.3.2 of the R language definition [1] states that argument matching to formal arguments is a 3-pass process to match arguments to a function. An error is generated if any (supplied) arguments are left unmatched. Interestingly the opposite is not true as any unmatched formals doe

Re: [Rd] On the mechanics of function evaluation and argument matching

2013-07-17 Thread R. Michael Weylandt
On Wed, Jul 17, 2013 at 9:58 AM, Brian Rowe wrote: > Hello, > > Section 4.3.2 of the R language definition [1] states that argument matching > to formal arguments is a 3-pass process to match arguments to a function. An > error is generated if any (supplied) arguments are left unmatched. > Inte

Re: [Rd] SweaveParseOptions, quoted commas, and knitr vignettes

2013-07-17 Thread Ben Bolker
Yihui Xie yihui.name> writes: > [snip] thanks, that all makes sense. > Two approaches to solve the problem: > > 1. either you Depends on knitr, > 2. or make install.packages() also install VignetteBuilder (specified > in DESCRIPTION) when the user chooses to install from source, i.e. > in