similar to: Error using Rcpp under windows xp

Displaying 20 results from an estimated 300 matches similar to: "Error using Rcpp under windows xp"

2012 May 03
1
Setting up a windows system for rcpp
I am running into a wall getting my system to work with rcpp and inline. Following Dirk's advice on stackoverflow, I hope someone is able to help me. My steps were to install MinGW 32 bit first, then installing Rtools, I disabled MinGW's entry in the PATH. I am trying to get the following code to work: library(Rcpp) library(inline) body <- ' NumericVector xx(x); return wrap(
2010 Mar 30
1
Adding RcppFrame to RcppResultSet causes segmentation fault
Hi, I'm a bit puzzled. I uses exactly the same code in RcppExamples package to try adding RcppFrame object to RcppResultSet. When running it gives me segmentation fault problem. I'm using gcc 4.1.2 on redhat 64bit. I'm not sure if this is the cause of the problem. Any advice would be greatly appreciated. Thank you. Rob. int numCol=4; std::vector<std::string>
2010 Dec 02
1
Strange problems with compiling dll
Dear sir\madam! I'm trying to speed up my R code by writing quite simple dll's in C. But I faced some problems, and I cannot determine their source. #include <Rinternals.h> SEXP mycombin(SEXP N, SEXP k){ int i, *j, *l, c; j = INTEGER(k);l = INTEGER(N); c = 1; if(j[0] > 0 && j[0] < l[0]){ if(j[0] <= l[0] - j[0]){ for(i =
2010 Dec 01
5
Pass an operator to function
Hi guys, How to pass an operator to a function. For example, test <- function(a, ">", b) { return(a>b) #the operator is passed as an argument } Thanks, -- View this message in context: http://r.789695.n4.nabble.com/Pass-an-operator-to-function-tp3066627p3066627.html Sent from the R help mailing list archive at Nabble.com.
2010 Mar 25
1
Error using Rcpp
Hi, Im not sure if this is the right place to post this. I am using Xubuntu Karmic Koala and am trying to use the Rcpp package. I am testing it using a simple code that takes in a vector and adds 1 to each element: #include <Rcpp.h> // This file takes in a vector and adds one to each entry RcppExport SEXP addone(SEXP vec){ // create a local copy of vec Rcpp::NumericVector
2013 May 24
0
Rcpp with OpenMP - Need example Makevars
Dear R experts, recently I started developing a Rcpp package "OpenMPTest". Within that package I want to use OpenMP, as in the following code example: // header file #include <omp.h> using namespace Rcpp ; RcppExport SEXP testOpenMP( SEXP nThreads ) ; // cpp file SEXP testOpenMP( SEXP nThreads ) { BEGIN_RCPP NumericVector numberThreads = NumericVector( nThreads );
2011 Dec 13
1
Rcpp too good to be true?
Hello all, I've been working on a package to do various things related to the Conway-Maxwell-Poisson distribution and wanted to be able to make fast random draws from the distribution. My R code was running quite slow so I decided to give Rcpp a bash. I had used it before but only for extremely basic stuff and always using inline. This time I decided to give making a proper package a go.
2010 Nov 25
6
help: program efficiency
hey guys, I am working on a function to make a duplicated value unique. For example, the original vector would be like : a = c(2,1,1,3,3,3,4) I'll like to transform it into: a.nodup = 2, 1.01, 1.02, 3.01, 3.02, 3.03, 4 basically, find the duplicates and assign a unique value by adding a small amount and keep it in order. I come up with the following codes, but it runs slow if t is large. Is
2013 May 14
2
invalid operands of types ‘SEXPREC*’ and ‘R_len_t’ to binary ‘operator/’ with Rcpp.
Dear R-Developers, I just started learning how to use Rcpp. Earlier while using it, I encountered an error as shown below: file74d8254b96d4.cpp: In function ‘Rcpp::NumericVector foo(Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::Function, Rcpp::Function)’: file74d8254b96d4.cpp:10: error: invalid operands of types ‘SEXPREC*’ and ‘R_len_t’ to binary ‘operator/’ make: ***
2011 Dec 16
0
crash in using Rcpp and inline packages.
Hi all, I am using c++ functions in R by Rcpp and inline packages. The code is quite simple, but the R session always automatically crash after some running time. Does anyone here familiar with Rcpp and inline? What¡¯s the problem in the following code? I have checked the input values, no NA and other strange value exists. Thank you for your attention! > mkc <- cxxfunction(
2011 Dec 16
0
Fw: crash in using Rcpp and inline packages.
Hi all, I am using c++ functions in R by Rcpp and inline packages. The code is quite simple, but the R session always automatically crash after some running time. Does anyone here familiar with Rcpp and inline? What¡¯s the problem in the following code? I have checked the input values, no NA and other strange value exists. Thank you for your attention! > mkc <- cxxfunction(
2015 Nov 03
1
Fwd: Rcpp sugar dpois
Hi. Here is a piece of cpp code. It works, but I do not understand the rational for the use of "R::dpois" to call the function dpois since in the examples I have always found directly "dpois" or "Rcpp::dpois" that both do not work in my code. Could anyone be so patient to explain me why should it be like that? Thaks a lot, Enrico #include <Rcpp.h> using
2011 Apr 14
1
Rcpp segmentation faults on the simplest code
Hi all, I'm new to R and Rcpp, and I'm trying to learn Rcpp with the simplest code possible. My goal is to be able to call R functions from C++. The code I'm trying to run is: #include #include #include #include int main(int argc, char* argv[]) { Rcpp::NumericVector v(1); return 0; } It compiles and links fine. However, as soon as I run it, it segfaults. The following is
2017 Dec 03
0
Rcpp, dyn.load and C++ problems
.Call("compute_values_cpp") Also, if you were passing arguments to the C++ function you would need to declare the function differently. Do a search on "Rcpp calling C++ functions from R" HTH, Eric On Sun, Dec 3, 2017 at 3:06 AM, Martin M?ller Skarbiniks Pedersen < traxplayer at gmail.com> wrote: > Hi, > > I have written a small C++ function and compile it.
2011 Apr 15
1
[Rcpp-devel] Find number of elements less than some number: Elegant/fastsolution needed
On Thu, Apr 14, 2011 at 7:02 PM, <rcpp-devel-request at r-forge.wu-wien.ac.at> wrote: > I was able to write a very short C++ function using the Rcpp package > that provided about a 1000-fold increase in speed relative to the best > I could do in R. ?I don't have the script on this computer so I will > post it tomorrow when I am back on the computer at the office. > >
2017 Dec 03
5
Rcpp, dyn.load and C++ problems
Hi, I have written a small C++ function and compile it. However in R I can't see the function I have defined in C++. I have read some web-pages about Rcpp and C++ but it is a bit confusion for me. Anyway, This is the C++-code: #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] List compute_values_cpp(int totalPoints = 1e5, double angle_increment = 0.01, int radius =
2011 Sep 13
1
Getting Rcpp SEXP data in C++
Friends I am looking at Rcpp and I am a bit stuck on a simple matter. (I am calling R from c++, if there is a better way...) Given this simple example using the TTR package and the SMA function which returns a simple moving average.... Rcpp::NumericVector rv; for(int i = 0; i < 100; i++){ rv.push_back(rand()); } Rcpp::Environment TTR("package:TTR");
2013 Dec 02
0
g++ ignores TMPDIR when called from install.packages
I'm experiencing an issue when compiling R packages containing c++ code inside a sandbox on linux. The problem is caused by the fact that g++ does not seem to inherit the TMPDIR environment variable from the R process. When creating the shared on library, it tries to write a file under /tmp (instead of $TMPDIR). If /tmp is not writable, this causes the package build to fail. I am personally
2011 Oct 12
1
Error in Rcpp/inline (Windows XP)
Hi, everyone, I am just trying to use Rcpp in my computer, and I would like to try a simple example from website, but R keeps reporting me error. I am using Windows XP, and has installed Rtools and GSI. Here is the response: > src = ' + Rcpp::NumericVector xa(a); + Rcpp::NumericVector xb(b); + int n_xa = xa.size(); + int n_xb = xb.size(); + + Rcpp::NumericVector xab(n_xa + n_xb - 1);
2017 Dec 03
0
Rcpp, dyn.load and C++ problems
Martin, You are making your life way too complicated. There are a number of things I would do differently: 0) Wrong list. Rcpp has its down, rcpp-devel, and I basically do not read this and would have missed this were it not for luck. On 3 December 2017 at 02:06, Martin M?ller Skarbiniks Pedersen wrote: | I have read some web-pages about Rcpp and C++ but it is a bit confusion | for me. 1)