Re: [Bioc-devel] ClassifyR Fails to Build on Windows

2015-01-16 Thread Dario Strbenac
Thank you for the detailed explanation. I understand the cause now. Actually, 
the exact problem is that, in runTest, I have a condition that depends on the 
previous function calls :

 if(any(grepl(runTests, deparse(sys.calls()

If runTest was called by runTests, then I intend to return a particular value 
that does not refer to the variable datasetName. If runTest was called directly 
by the user, such as when they have one training and on test dataset and don't 
need to do the cross-validation offered by runTests, I intend to return a 
ClassifyResult object, which does refer to the variable datasetName. The 
condition evaluates to FALSE, even when runTest was called by runTests on 
Windows, and executes the unintended code block which makes reference to 
datasetName, which is missing. How can I make my check of previously called 
functions platform-independent when I am also using parallelisation ?

--
Dario Strbenac
PhD Student
University of Sydney
Camperdown NSW 2050
Australia
___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] ClassifyR Fails to Build on Windows

2015-01-16 Thread Martin Morgan

On 01/16/2015 03:00 PM, Dario Strbenac wrote:

Thank you for the detailed explanation. I understand the cause now. Actually, 
the exact problem is that, in runTest, I have a condition that depends on the 
previous function calls :

  if(any(grepl(runTests, deparse(sys.calls()

If runTest was called by runTests, then I intend to return a particular value 
that does not refer to the variable datasetName. If runTest was called directly 
by the user, such as when they have one training and on test dataset and don't 
need to do the cross-validation offered by runTests, I intend to return a 
ClassifyResult object, which does refer to the variable datasetName. The 
condition evaluates to FALSE, even when runTest was called by runTests on 
Windows, and executes the unintended code block which makes reference to 
datasetName, which is missing. How can I make my check of previously called 
functions platform-independent when I am also using parallelisation ?



I'd just be more direct about signalling what you want runTest to do, by adding 
an extra argument


fun - function(..., .init=FALSE)
## document .init as 'internal' argument not for end users
{
if (.init)
return(done)
message(doing)
fun(..., .init=TRUE)
}

If you'd like to keep .init from user view, then implement the above as .fun, 
and provide an end-user wrapper


fun - function(...) .fun(..., .init=FALSE)

Martin


--
Dario Strbenac
PhD Student
University of Sydney
Camperdown NSW 2050
Australia
___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel




--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] ClassifyR Fails to Build on Windows

2015-01-15 Thread Dan Tenenbaum
There is no shared memory on windows so you need to make sure you require() any 
necessary packages on each node. 

Dan

On January 15, 2015 5:00:22 PM PST, Dario Strbenac dstr7...@uni.sydney.edu.au 
wrote:
Hello,

The development version of ClassifyR won't build on Windows. It happens
for a code section in the vignette that executes a function that has a
bpmapply loop. However, I'm using the default parameters by calling
bpparam(), so it should work on Windows. The code in the vignette
executes without problems for Linux and Mac OS. Is there a flaw in the
development version of BiocParallel ?

--
Dario Strbenac
PhD Student
University of Sydney
Camperdown NSW 2050
Australia
___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel