looks like you did something bad with a pointer, but it's hard to
know without seeing your code.
why don't you run w/ valgrind, it might help you locate the problem.
like this:
warmstrong@krypton:~$ R --debugger=valgrind
==28550== Memcheck, a memory error detector
==28550== Copyright (C) 2002-201
I've been looking in the archives of this list for a while, so forgive
me if I've missed it.
Does Rcpp expose a version of the DATAPTR macro?
Sadly, I have a need for a void* in my code... So I need a very old
school C way of accessing the raw memory referenced by an SEXP.
I tried to use RAW(),
1, 2012 at 2:42 PM, Dirk Eddelbuettel wrote:
>
> On 11 April 2012 at 14:16, Whit Armstrong wrote:
> | I've been looking in the archives of this list for a while, so forgive
> | me if I've missed it.
> |
> | Does Rcpp expose a version of the DATAPTR macro?
>
> Nothi
kick in, then I should be all set...
and yes. Looks good. Compiles. No test failures.
Thanks again.
-Whit
On Wed, Apr 11, 2012 at 3:54 PM, Dirk Eddelbuettel wrote:
>
> On 11 April 2012 at 15:32, Whit Armstrong wrote:
> | Thanks, Dirk.
> |
> | one more quick q.
> |
>
Has anyone seen this subtle change between R 2.15 and R-devel for
packages linking to RcppArmadillo?
on R 2.15:
warmstrong@krypton:~/dvl/R.packages/rcppbugs.Rcheck/rcppbugs/libs$ nm
-C rcppbugs.so |grep assert
warmstrong@krypton:~/dvl/R.packages/rcppbugs.Rcheck/rcppbugs/libs$
on R-devel:
nodeadmi
> Well I did tell you (off-list) about the change which I had sprinkled into
> your rcppbugs code in order to suppress such a warning with R 2.15.0 on your
> initial release 0.0.2:
Ugg. Sorry, it's been a blur the last couple of days. I'll revisit
your suggestion.
-Whit
Ok. got it working now. Thanks for preemptively pointing this out;
sorry for overlooking your comments.
-Whit
On Thu, Apr 26, 2012 at 12:50 PM, Whit Armstrong
wrote:
>> Well I did tell you (off-list) about the change which I had sprinkled into
>> your rcppbugs code in order to sup
Slightly off topic, but Dirk kindly allowed me to make a quick
benchmark post on rcppbugs.
Just a short post to the list showing some performance numbers (for
running a simple linear regression) of rcppbugs (with an RcppArmadillo
core) vs MCMCpack (Scythe core) vs JAGS (?? core).
I was fairly opt
e.wu-wien.ac.at
> [mailto:rcpp-devel-boun...@r-forge.wu-wien.ac.at] On Behalf Of Dirk
> Eddelbuettel
> Sent: Thursday, April 26, 2012 11:28 PM
> To: Whit Armstrong
> Cc: rcpp-devel
> Subject: Re: [Rcpp-devel] RcppArmadillo -- crude benchmark of various mcmcvs
> rcppbugs
>
&
.40GHz
>
> Thanks,
> Dale Smith, Ph.D.
> Senior Financial Quantitative Analyst
> Risk & Compliance
> Fiserv.
> 107 Technology Park
> Norcross, GA 30092
> Office: 678-375-5315
> Mobile: 678-982-6599
> Mail: dale.sm...@fiserv.com
> www.fiserv.com
>
>
&
Doug,
Apologies for my question, it's a little off topic from your original
post (hence the modified subject).
I've integrated Armadillo into the new mcmc packages I've been
developing without giving much thought to Eigen.
Unfortunately, the benchmarks page on the Armadillo site doesn't
provide
12 at 08:20, Whit Armstrong wrote:
> | Doug,
> |
> | Apologies for my question, it's a little off topic from your original
> | post (hence the modified subject).
> |
> | I've integrated Armadillo into the new mcmc packages I've been
> | developing without givi
For mac specific questions, you should also try here:
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Also, you might want to stick w/ gcc 4.6.
gcc 4.7 is still very new, and I have already seen issues w/ cppbugs
when -O2 is turned on...
just my 2c.
-Whit
On Thu, May 24, 2012 at 7:34 PM, Nick
Congrats!
You might find these links useful.
Here is my presentation from R/Fin:
https://github.com/downloads/armstrtw/rcppbugs/rcppbugs.pdf
Also, here is another github project where I'm collecting rcppbugs examples:
https://github.com/armstrtw/rcppbugs.examples
And please post any bugs you fi
This is great, guys.
In particular this example:
http://gallery.rcpp.org/articles/creating-xts-from-c++/
I'm going to steal this and use it in my fts package.
-Whit
On Mon, Jan 14, 2013 at 11:14 AM, JJ Allaire wrote:
> Hello everyone,
>
> We are excited to introduce a new website featuring Rc
you can also use intel TBB, just depends on your preference for syntax
I suppose. I've never tried to use openMP threads, but intel tbb
works quite nicely.
example here based off of rrcov package:
https://github.com/armstrtw/rrcov/blob/master/src/covOPW.cpp#L58
Sorry, Dirk, this doesn't use Rcpp
I didn't see a separate mailing list for rcppredis, so posting here...
Does anyone know how to set a value with a space in it from rcppredis?
I can do it from the command line:
warmstrong@krypton:~/dvl/c++/redis.example$ redis-cli SADD hats 'my big hat'
(integer) 1
warmstrong@krypton:~/dvl/c++/re
Hi, Tony, and thanks Dirk and JL.
The answer is that before alias templates (
http://en.cppreference.com/w/cpp/language/type_alias) each distribution
needed its own class definition and header file. There was basically a
large amount of overhead in maintaining each distribution.
When the package
> indexing, but apparently one cannot pass more than one parameter to []
> so ... I guess I'll have to sacrifice look and feel for a minute.
yes, same issue for me in tslib. but (i,j) is not so bad esp for
matlab users. tslib users have it even harder since x() is used as
lag/lead. x[] is used a
I think the Armadillo stuff is great. MTL4 is also great, but lacking
some of the features of Armadillo.
http://www.osl.iu.edu/research/mtl/mtl4/
All the good libraries that I've seen allow you to construct objects
from a pointer to raw memory and dimensions which should be very easy
to write fo
Oh, boy. I _do_ want a pony!
> Don;t forget we all want a pony too. Now, seriously, what is R++?
> If I knew what you were talking about I might have a chance of answering this
> :)
I was talking about this one:
http://www.cs.kent.ac.uk/projects/cxxr
which Romain has pointed out in the next po
All the newer c++ matrix template libraries are very good. I like
Armadillo in particular with MTL as a close second.
As much of a pain as it is to learn a new library, you code will be
infinitely more readable if you use a matrix library.
here are the operator examples from MTL4 and Armadillo f
Dominick, wtf?
Rcpp is on one of the most rapid development cycles that I've ever
seen. If you want stability, then why don't you wait about six more
months before you start using Rcpp in your projects.
Alternatively, you can easily center your package on a particular
version by enclosing your p
I just reviewed the Rcpp documentation.
I see plenty of cfunction/cxxfunction examples, but I'm curious
whether one can provide a class definition inline in an R script and
then initialize an instance of the class and call a method on the
class. all inline in R.
Is this feature something you all
S can finally die.
-Whit
2010/10/5 Dirk Eddelbuettel :
>
> Hi Whit,
>
> On 5 October 2010 at 12:25, Whit Armstrong wrote:
> | I just reviewed the Rcpp documentation.
>
> Great. Now tell us how to make it sticky so that we get you to contribute :)
>
> | I see plenty of cfu
Thanks for the example! that makes everything clear.
-Whit
2010/10/5 Dirk Eddelbuettel :
>
> On 5 October 2010 at 13:21, Whit Armstrong wrote:
> | aha, thanks for correcting me. on the inline/Rcpp division of labor.
> |
> | So, what you are suggesting should have been obvious t
;- matrix(rnorm(NR*NC),NR,NC)
y <- rnorm(NR)
print(system.time(ans <- fun(x,y)))
print(ans)
actual run:
> source("test.inline.bugs.R")
user system elapsed
0.420 0.020 0.435
$b
[1] -0.01127731 -0.11217234
$ar
[1] 0.29405
2010/10/5 Dirk Eddelbuettel :
>
> On 5 Octob
Very cool that you guys used my example in your Google Tech Talk.
Thanks for the continued hard work on Rcpp!
-Whit
2010/10/9 Dirk Eddelbuettel :
>
> On 8 October 2010 at 23:26, Whit Armstrong wrote:
> | Thanks again, Dirk.
> |
> | full example (sorry for the verbose post):
unless you are preallocating space to store your answer, then every
reassignment could potentially cause the whole vector to be
reallocated.
if you know in advance how many runs you will do, and the thinning,
then preallocate the vector and assign into it.
Alternatively, implement your mcmc model
Dominick,
> Merging Rcpp into cxxPack may be the only way that I can move on to
> the work that really interests me. I am open to other suggestions from
> the R community...
I strongly encourage you to do this. I think the nice folks at
R-forge will even give you your own mailing list.
Joking a
I could probably show you the Gelman - Radon example in my MCMC framework.
Might be able to do a speed comparison w/ JAGS, but not sure if there
is sufficient time left for me to send and you to integrate the
example.
Let me know what you think.
-Whit
On Tue, Apr 26, 2011 at 6:56 PM, Dirk Edde
On Wed, Apr 27, 2011 at 12:47 AM, Dirk Eddelbuettel wrote:
>
> On 26 April 2011 at 20:53, Whit Armstrong wrote:
> | I could probably show you the Gelman - Radon example in my MCMC framework.
> |
> | Might be able to do a speed comparison w/ JAGS, but not sure if there
> |
You're not the only person working on MCMC w/ Rcpp.
I'm not sure about your exact question, but if you provide a .bug file
or write your model in pseudo code (i.e. alpha ~ dnorm(0, tau)), then
I'll write up a cppbugs example for you.
-Whit
On Wed, Jun 15, 2011 at 5:03 PM, Nicolas Heslot wrote
I'm not giving up yet. I'll implement the distribution that is
missing, and send you the example if you lay out your model w/
pseudocode.
-Whit
On Wed, Jun 15, 2011 at 7:59 PM, Nicolas Heslot wrote:
> Hi,
>
> Thank you for your quick answer.
> Sorry that I did not explain well enought my issue
Shige,
That example is quite dated at this point. The CppBugs api has
changed a lot since then and is likely to change more in the near
future.
Please git pull the latest from github, and ping me if you have any issues.
There are also quite a few pure c++ examples the the 'test' dir to get
you
he suggestion.
>
> Best,
> Shige
>
> On Fri, Sep 30, 2011 at 10:06 PM, Whit Armstrong
> wrote:
>> Shige,
>>
>> That example is quite dated at this point. The CppBugs api has
>> changed a lot since then and is likely to change more in the near
>> future.
gs in
> standalone mode as per Whit's examples in hit repo. Then revisit i)
> and wrap it too.
>
> Dirk
>
> | Best,
> | Shige
> |
> | On Sat, Oct 1, 2011 at 1:52 PM, Whit Armstrong
> wrote:
> | > I'm happy to provide more examples of cppbu
Thanks, Dirk.
Shige, this is still alpha software. Don't expect it to be perfect.
As you encounter bugs, please let me know.
-Whit
On Sat, Oct 1, 2011 at 5:54 PM, Dirk Eddelbuettel wrote:
>
> On 1 October 2011 at 17:16, Whit Armstrong wrote:
> | Please have a look here.
> |
if you want it to be inline, then simply copy the contents of the .hpp
and .cpp files into your R script and quote them.
what the getModel function does is simply read the file into a string.
I do it this way because emacs knows how to properly indent the file
if I keep it separate (rather than a
post your code.
The speedup depends on your model. My comparisons were based on
R/JAGS and pymc on linux.
-Whit
On Mon, Dec 19, 2011 at 7:30 AM, Watson, Samuel
wrote:
> I am currently using CppBugs with Rcpp through R. I am very interested to
> use CppBugs as I am finding WinBugs to be prohi
nty[county.name==uniq[i]] <- i
> }
>
> system.time(radon.model(GR=county22,lev=log.radon2,basm=floor2,iterations=1e4L,burn=1e4L,adapt=2e3L,thin=5L))
>
> #its necessary to change the structure of the data files or else winbugs has
> an error
> log.radon<-as.numeric(log.radon)
> floor<-as.numeric(floor)
> county<-as.nu
7;t
> work out why I can't an equivalent speed to you.
> Would you have any other recommendations of things that could be slowing the
> model down?
>
> I am running Windows 7 Enterprise on Intel Core i7-2600 @ 3.4 GHz w/ 8GB DDR3
> RAM
>
> Many thanks,
> Sam Watso
all.
>
> For the linear model example you provide the difference for me for winbugs vs
> cppbugs is 40s vs 10s which is a big difference.
> I will test some more models and hopefully this model is just an anomaly for
> me.
>
> Thanks for a great package!
>
> Sam
>
>
eloping a way of specifying initial values for each
> Markov chain?
>
> Sam
> -Original Message-
> From: Whit Armstrong [mailto:armstrong.w...@gmail.com]
> Sent: 19 December 2011 18:24
> To: Watson, Samuel
> Cc: rcpp-de...@r-forge.wu-wien.ac.at
> Subject: Re: [Rcpp
using cxxfunction is there an easy (not using a custom plugin) way to
add -std=c++0x to the g++ call?
-Whit
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
ersion:0.2.34
Date: $Date: 2011-12-12 16:56:37 -0600 (Mon, 12 Dec 2011) $
Anyway, I'll keep tinkering...
-Whit
On Tue, Jan 24, 2012 at 3:18 PM, Dirk Eddelbuettel wrote:
>
> On 24 January 2012 at 14:46, Whit Armstrong wrote:
> | using cxxfunction is there an
ue;",settings=cppbugs.plugin)
## this blows up
foo.bar <- cxxfunction(signature(hat="numeric"), body="#include
\nreturn R_NilValue;",settings=cppbugs.plugin,verbose=TRUE)
-Whit
On Tue, Jan 24, 2012 at 3:36 PM, Whit Armstrong
wrote:
> Thanks, Dirk, as always fo
yes, unless I add
#include
Then it blows up.
The problem is in my real function I include a header, which includes armadillo.
So, unless I go deleting all the refs to #include , I think
it will continue to blow up... (with the current released version).
Anyway, I'll just wait for the next re
Thanks for your help.
-Whit
On Tue, Jan 24, 2012 at 4:39 PM, Dirk Eddelbuettel wrote:
>
> On 24 January 2012 at 16:27, Whit Armstrong wrote:
> | yes, unless I add
> |
> | #include
> |
> | Then it blows up.
> |
> | The problem is in my real function I inclu
") : running ‘make’ failed
Execution halted
warmstrong@krypton:~/dvl/R.packages/external$
Is this a missing dependency on my workstation?
seems to be here too:
http://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-gcc-fedora/Rcpp-00check.html
-Whit
On Tue, Jan 24, 2012 at 4:58 PM
I've been thinking for a while about using clang to do source-to-source
translation to generate the R bindings for a given c++ class.
There are lots of examples online, but I haven't yet tackled this for R.
http://eli.thegreenplace.net/2012/06/08/basic-source-to-source-transformation-with-clang
h
Have a look at this project:
https://github.com/richfitz/RcppR6
On Mon, Nov 28, 2016 at 11:40 PM, Christian Gunning wrote:
> Dear List,
>
> The following is a general request for advice / comment on modern Rcpp
> development best-practices for package & class development. I looked over
> the Rc
ules)
> offers average users over RefClasses + Rcpp functions, where the RefClass
> holds state, and the Rcpp functions operate on the state using by-reference
> semantics.
>
> -Christian
>
> On Tue, Nov 29, 2016 at 5:33 AM, Whit Armstrong
> wrote:
>
>> Have a look a
53 matches
Mail list logo