Hi,
in BiocParallel, is there a suggested (or planned) best standards for
making *locally* assigned variables (e.g. functions) available to the
applied function when it runs in a separate R process (which will be
the most common use case)? I understand that avoid local variables
should be
An analog to clusterExport is a good idea. To make it even easier, we could
have a dynamic environment based on object tables that would catch missing
symbols and download them from the parent thread. But maybe there's some
benefit to being explicit?
Michael
On Sun, Nov 3, 2013 at 12:39 PM,
On Sun, Nov 3, 2013 at 1:29 PM, Michael Lawrence
lawrence.mich...@gene.com wrote:
An analog to clusterExport is a good idea. To make it even easier, we could
have a dynamic environment based on object tables that would catch missing
symbols and download them from the parent thread. But maybe
Here's an easy thing we can add to BiocParallel in the short term. The
following code defines a wrapper function withBPExtraErrorText that
simply appends an additional message to the end of any error that looks
like it is about a missing variable. We could wrap every evaluation in
a similar
Another potential easy step we can do is that if FUN function in the
user's workspace, we automatically export that function under the same
name in the children. This would make recursive functions just work, but
it might be a bit too magical.
On 11/3/13, 2:38 PM, Ryan wrote:
Here's an easy
Henrik,
See https://github.com/duncantl/CodeDepends (as used by used by
https://github.com/gmbecker/RCacheSuite). It will identify necessarily
defined symbols (input variables) for code that is not doing certain tricks
(eg get(), mixing data.frame columns and gobal variables in formulas, etc ).
I guess all we need to do is to detect whether a function would try to
access a free variable in the user's workspace, and warn/error if so.
It looks like CodeDepends could do that. I could try to come up with an
implementation. I guess we would add CodeDepends as an optional
dependency for
Ryan (et al),
FYI:
f
function() {
x = rnorm(x)
x
}
findGlobals(f)
[1] = { rnorm
x should be in the list of globals but it isn't.
~G
sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3]
Ok, here is my attempt at a function to get the list of user-defined
free variables that a function refers to:
https://gist.github.com/DarwinAwardWinner/7298557
Is uses codetools, so it is subject to the limitations of that package,
but for simple examples, it successfully detects when a
eval() tends to be able to convince normal functions of where they are
executing, but primitive functions use different methods to get their
evaluation context and aren't as easily fooled. It turns out do.call()
works better on primitive functions, and it will work for on.exit.
However I wasn't
Hi,
Recently, I made an R package that used the C++ library Boost.Thread
(http://www.boost.org/doc/libs/1_54_0/doc/html/thread.html) for multithreading.
Previously, I have posted a question at stackoverflow
On 3 November 2013 at 11:35, Simon wrote:
| Hi,
|
| Recently, I made an R package that used the C++ library Boost.Thread
(http://www.boost.org/doc/libs/1_54_0/doc/html/thread.html) for multithreading.
Previously, I have posted a question at stackoverflow
I had a bunch of examples of byte code compiles in something I was
writing. Changed to 3.0.2 and the advantage of compiler disappears. I've
looked in the NEWS file but do not see anything that suggests that the
compile is now built-in. Possibly I've just happened on a bunch of
examples where it
On 13-11-03 2:15 PM, Prof J C Nash (U30A) wrote:
I had a bunch of examples of byte code compiles in something I was
writing. Changed to 3.0.2 and the advantage of compiler disappears. I've
looked in the NEWS file but do not see anything that suggests that the
compile is now built-in. Possibly
My bad to not give details. I'm comparing (though not quite directly) to
results in the posting
http://rwiki.sciviews.org/doku.php?id=tips:rqcasestudy.
What prompted the query was a write up of for versus while loops,
where there was a speedup using compiler for one of these. I had the
example in
tfor - cmpfun(tfor)
twhile - cmpfun(twhile)
/Henrik
On Sun, Nov 3, 2013 at 11:55 AM, Prof J C Nash (U30A) nas...@uottawa.ca wrote:
My bad to not give details. I'm comparing (though not quite directly) to
results in the posting
http://rwiki.sciviews.org/doku.php?id=tips:rqcasestudy.
What
On Sun, Nov 3, 2013 at 2:16 AM, Peter Meilstrup
peter.meilst...@gmail.com wrote:
eval() tends to be able to convince normal functions of where they are
executing, but primitive functions use different methods to get their
evaluation context and aren't as easily fooled.
Brilliant wording :)
Thanks. I should not try adjusting code after some hours of proofreading.
Making that change gave a suitable time difference.
Best, JN
On 13-11-03 03:46 PM, Henrik Bengtsson wrote:
tfor - cmpfun(tfor)
twhile - cmpfun(twhile)
/Henrik
On Sun, Nov 3, 2013 at 11:55 AM, Prof J C Nash
Before trying to submit a patch(*) to on.exit(), I'd like to check
whether there is an interest in enhancing on.exit(..., add=TRUE) such
that it is possible to specify whether the added expression should be
added before or after already recorded expression. The default is now
to add it after, but
Hi everyone,
I am trying to install kernlab package, but failed many times by now on
CentOS 6 operating system. FYI, I have no problem with this package
installation on windows platform.
Here is the error message:
trying URL 'http://cran.wustl.edu/src/contrib/kernlab_0.9-18.tar.gz'
Content
I'd like to echo Whit's sentiment and hopefully warm up this thread.
C++11's new features and functionality give R users low-level tools (like
threads, mutexes, futures, date-time, and atomic types) that work across
platforms and wouldn't require other external libraries like boost.
Romain, will
I used to worry about the order of evaluation of on.exit expressions and
thought that maybe we needed named on.exit expression so you could
remove particular on.exit expressions. However, now I think I can almost
always
avoid such considerations and make code clearer by making a new function
Hi Dirk,
Thank you very much, your answers are always helpful and point me to the
right direction.
And I also hope the C++11 proposal (
https://stat.ethz.ch/pipermail/r-devel/2013-October/067677.html) will be
approved soon. :-)
Simon
On 11/03/2013 09:54 PM, Dirk Eddelbuettel wrote:
On 3
Hi,
I can't reproduce the error with a fully updated CentOS 6 with R-core
and R-devel installed from
http://www.nic.funet.fi/pub/mirrors/fedora.redhat.com/pub/epel/6/x86_64/.
Here is the sessionInfo from my CentOS 6 system where installation of
kernlab was successful:
sessionInfo()
R version
May I suggest a minor addition to the existing help page for ?plotmath, ...
immediately following:
Note that bold, italic and bolditalic do not apply to symbols, and hence not
to the Greek symbols such as mu which are displayed in the symbol font. They
also do not apply to numeric constants.
25 matches
Mail list logo