<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p><span id="ms-rterangepaste-start"></span></p>
<p>Hi,</p>
<p><br>
</p>
<p>In the bssm package (<a href="https://github.com/helske/bssm" class="OWAAutoLink" id="LPlnk158659" previewremoved="true">https://github.com/helske/bssm</a>), I let the users define a state space model via own C++ functions which are then exported as Xptr
to R side, and passed back to C++ function for SMC/MCMC etc. Normally this works fine, but when user repeatedly modifies the model functions and re-exports them via repeated calls sourceCpp, sometimes whole Rstudio crashes. I haven't been able to pinpoint
the reason or minimal example. Have anyone else experienced similar issues or is it just me i.e. error in my own implementations?</p>
<p><br>
</p>
<p>Simplest case of this is the discretized SDE models, this is the function which user modifies:
<a href="https://github.com/helske/bssm/blob/master/vignettes/sde_functions.cpp" class="OWAAutoLink" id="LPlnk922418" previewremoved="true">
https://github.com/helske/bssm/blob/master/vignettes/sde_functions.cpp, </a>and the relevant parts of the package codes are in src/function_pointers.h, src/sde_ssm.cpp and src/R_sde.cpp (I don't really expect anyone to read through all of these).</p>
<br>
<p>Best,</p>
<p><br>
</p>
<p>Jouni Helske<br>
</p>
<span id="ms-rterangepaste-end"></span><br>
<p></p>
</div>
</body>
</html>