[R-pkg-devel] Managing RNG in C code

2015-06-04 Thread Guillaume Chapron
Hello, I am working on a package where I am passing some computations from R to C and back. The C code runs many stochastic trajectories of a population model (with the RNG from R through multiple calls to GetRNGstate and PutRNGstate). I would like that each trajectory has its own seed. My pr

[R-pkg-devel] Multi-threaded C with R's RNG

2015-11-27 Thread Guillaume Chapron
Hello, Has anyone written a package with a C code that uses R's RNG but in a multi-threaded way (e.g. to parallelize Monte Carlo simulations)? I do not have the knowledge to figure out myself how to solved this and would need to see an example. Thanks! Guillaume -- Guillaume Chapron

[R-pkg-devel] Rprintf with mclapply

2016-02-11 Thread Guillaume Chapron
Hello, I have a R package with a compiled C executable to run simulations. Simulations can be very long so I use mclapply to launch several instances (each with a different R seed). I would need to follow the simulation progress and I used to do that with printf in the C code. But this is not a

[R-pkg-devel] scripting R through lldb

2016-06-15 Thread Guillaume Chapron
Hello, I am debugging a package that contains some compiled C code. The C code uses R random number generator so I cannot (or have not figured out how to) debug it without running it through R. What I do is to type the following in the terminal: R --debugger=lldb then in the lldb prompt r a

Re: [R-pkg-devel] scripting R through lldb

2016-06-15 Thread Guillaume Chapron
or at least > serve as a starting point for your version. > > Best, > Kevin > > On Wed, Jun 15, 2016 at 12:39 PM, Guillaume Chapron > wrote: >> Hello, >> >> I am debugging a package that contains some compiled C code. The C code uses >> R random num

[R-pkg-devel] Compiler optimization flags with R package

2017-06-17 Thread Guillaume Chapron
Hello, I am trying to debug some C code that is run only through a R package. I debug with lldb but I always get a message telling that the package "was compiled with optimization - stepping may behave oddly; variables may not be available.” And in fact, I cannot evaluate all variables and unde

Re: [R-pkg-devel] Compiler optimization flags with R package

2017-06-18 Thread Guillaume Chapron
> On 17 June 2017 at 21:32, Guillaume Chapron wrote: > | I am trying to debug some C code that is run only through a R package. I > debug with lldb but I always get a message telling that the package "was > compiled with optimization - stepping may behave oddly; variables may no

[R-pkg-devel] R package with Swift code

2017-11-29 Thread Guillaume Chapron
Hello, Does anyone know of an example of a R package that contains Swift code (https://swift.org), like many packages use C code? Thanks Guillaume __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel