On 22 June 2013 at 20:34, Marc Jekel wrote:
| There was indeed a problem with the matrix index, thank you Dirk! And
| using "return Rcpp::wrap(weightsNet)" instead of "return weightsNet"
| helped to fix a problem when I created a R-package with the function
| included, thank you Simon!
You do
Dear all,
Thank you for the fast and helpful replies! I was able to fix the
function/the problem.
There was indeed a problem with the matrix index, thank you Dirk! And
using "return Rcpp::wrap(weightsNet)" instead of "return weightsNet"
helped to fix a problem when I created a R-package wit
I actually do not know, for what you are using this function.are you
calling it from R or inside another C++ function?
On Jun 22, 2013, at 6:49 PM, Simon Zehnder wrote:
> Marc,
>
>
> I tried it via an inline function and I got a segfault.
>
> it is probably the return value: Rcpp::w
Marc,
I tried it via an inline function and I got a segfault.
it is probably the return value: Rcpp::wrap(weightsNet) instead of solely
weightsNet.
Best
Simon
On Jun 22, 2013, at 6:10 PM, Marc Jekel wrote:
> Dear Rcpp users,
>
> I am a beginner, I was inspired by the new book by E
Hi Marc,
Welcome, and thanks for posting here.
>From a quick glance, it looks like
for(int loopCol = 0; loopCol < numbCues; loopCol++){
for(int loop = 0; loop < numbCues; loop++) {
weightsNet(1+loopCol, numbCues + 1 + loop)= pattern(loopCol,loop);
^
I would say you should create a simpler example that still crashes. Comment out
everything except the first for loop; see if it crashes then. If not, uncomment
the next one, etc. Repeat this until you find where it crashes.
Do you have a one-off problem with a loop index? I think you do, but wil
Dear Rcpp users,
I am a beginner, I was inspired by the new book by Eddelbuettel and just
started to use Rccp. So far, everything works fine except for one
function. The strange thing about it is that I runs perfectly when I
call it several times but crashes my R session at some point (usually