Re: [Rd] declaring package dependencies

2013-09-15 Thread Brian Rowe
Something that might be of use to you guys is crant (https://github.com/muxspace/crant), which is a set of scripts to make package development and testing simpler. With crant you can build out multiple R instances (release, patch, devel) and then run the build chain against each one. It's

Re: [Rd] declaring package dependencies

2013-09-15 Thread Brian Rowe
on AWS connecting to github or rforge could probably be finished on a six-pack. Speak up if anyone thinks this would be useful. On Sep 15, 2013, at 9:58 PM, Yihui Xie x...@yihui.name wrote: I've been watching this thread closely and trying not to chime in, because as Brian Rowe mentioned

Re: [Rd] Type annotations for R function parameters.

2013-08-30 Thread Brian Rowe
The type constraints in lambda.r make this relatively easy. The idea is to add a declaration before a function that provides static typing on the function arguments. The type constraint also specifies the return type, so it would be straightforward to construct a graph. Where a type variable is

Re: [Rd] legitimate use of :::

2013-08-22 Thread Brian Rowe
Another point to consider is that copying someone else's code forces you to become a maintainer of the copied code. If there are any bug fixes/enhancements/what-have-you in the original you won't get those updates. So now you own the copied code and need to consider the cost of the codebase

Re: [Rd] Extending suggestion for stopifnot

2013-08-20 Thread Brian Rowe
If all you care about is emulating static type checking, then you can also accomplish the same thing with lambda.r using type constraints on function definitions. e.g. f(m) %::% matrix : matrix f(m) %as% { m } f(as.data.frame(matrix(rnorm(12),nrow=3))) Error in UseFunction(f, ...) : No

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

2013-07-17 Thread Brian Rowe
in this situation technically required arguments means required and referenced arguments. f() Error in f() : argument x is missing, with no default Can anyone shed light on the reasoning for this design choice? Warm Regards, Brian Rowe [1] http://cran.r-project.org/doc/manuals/r-release/R

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

2013-07-17 Thread Brian Rowe
...@gmail.com wrote: On Wed, Jul 17, 2013 at 9:58 AM, Brian Rowe r...@muxspace.com 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

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

2013-07-17 Thread Brian Rowe
at 10:20 AM, Ben Bolker bbol...@gmail.com wrote: Brian Rowe rowe at 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