Re: [Rcpp-devel] Segfaults when declaring Vector types

2011-04-14 Thread Patrick Ye
Hi Dirk, Thanks so much for the reply, I really appreciate it. I thought that I was misusing Rcpp, as all the examples I found seemed to be for writing C++ functions to be used in R -- not accessing R functions in C++. Thanks so much for your suggestions on RInside, I just found out about i

[Rcpp-devel] Segfaults when declaring Vector types

2011-04-14 Thread Patrick Ye
Hi all, I'm completely new to R and Rcpp, and I thought I'd just make a simple program to see how Rcpp works. Here is the code: #include #include #include #include RcppExport void get_weights(int num_of_numbers, double* numbers); RcppExport void get_weights(int num_of_numbers, double* number