Re: [Bioc-devel] changes to igraph break many Bioconductor packages (in release and devel)

2015-07-22 Thread Glyn Bradley
Hi All Is it acceptable to specify a particular version of igraph for our package to use, even as a temporary fix? Failing that, does anyone know of any way I can get R to tell me which functions in our package (CausalR) call which igraph functions? Thanks Glyn -Original Message-

Re: [Bioc-devel] testing class and length of function args

2015-07-22 Thread Jim Hester
Also just found https://github.com/mllg/checkmate Haven't used it before but it seems well thought out, also impressive test coverage! (not biased). On Wed, Jul 22, 2015 at 8:47 PM, Valerie Obenchain voben...@fredhutch.org wrote: There is a collection in S4Vectors that test atomic types and

Re: [Bioc-devel] testing class and length of function args

2015-07-22 Thread Valerie Obenchain
There is a collection in S4Vectors that test atomic types and return a logical. isSingleInteger isSingleNumber isSingleNumberOrNA isSingleString isSingleStringOrNA isTRUEorFALSE isSingleNumber(1:5) [1] FALSE isSingleNumber(NA) [1] FALSE Val On 07/22/2015 04:22 PM, Jim Hester wrote: Not

[Bioc-devel] testing class and length of function args

2015-07-22 Thread Michael Love
it's slightly annoying to write foo - function(x) { if ( ! is.numeric(x) ) stop(x should be numeric) if ( ! length(x) == 2 ) stop(x should be length 2) c(x[2], x[1]) } i wonder if we could have some core functions that test the class and the length in one and give the appropriate stop

Re: [Bioc-devel] testing class and length of function args

2015-07-22 Thread Jim Hester
Not sure about within Bioconductor but Hadley has a package to do this. https://github.com/hadley/assertthat On Wed, Jul 22, 2015 at 4:13 PM, Michael Love michaelisaiahl...@gmail.com wrote: it's slightly annoying to write foo - function(x) { if ( ! is.numeric(x) ) stop(x should be

Re: [Bioc-devel] changes to igraph break many Bioconductor packages (in release and devel)

2015-07-22 Thread Dan Tenenbaum
- Original Message - From: Glyn Bradley glyn.x.brad...@gsk.com To: bioc-devel@r-project.org Sent: Wednesday, July 22, 2015 1:59:18 AM Subject: Re: [Bioc-devel] changes to igraph break many Bioconductor packages (in release and devel) Hi All Is it acceptable to specify a