rinside

using rinside with qt in windows

守給你的承諾、 提交于 2019-12-19 04:04:32
问题 I am beginning using rinside and rcpp within c++. I just want to start from zero so my QT project has nothing but the creation of a RInside instance and I have a problem I cannot solve. I have only one dialog form in the project. My project file: QT += core gui TARGET = rcpp-rinside TEMPLATE = app SOURCES += main.cpp\ dialog.cpp HEADERS += dialog.h FORMS += dialog.ui INCLUDEPATH += C:\R\R-2.15.1\include INCLUDEPATH += C:\R\R-2.15.1\library\Rcpp\include INCLUDEPATH += C:\R\R-2.15.1\library

RInside call with arguments from R

眉间皱痕 提交于 2019-12-11 18:35:40
问题 I am trying to pass arguments to an exe file that includes RInside , and that is compiled using make . By taking this code inspired from here. #include <RInside.h> int main(int argc, char *argv[]) { // define two vectors in C++ std::vector<double> x({1.23, 2.34, 3.45}); std::vector<double> y({2.34, 3.45, 1.23}); // start R RInside R(argc, argv); // define a function in R R.parseEvalQ("rtest <- function(x, y) {x + y}"); // transfer the vectors to R R["x"] = x; R["y"] = y; // call the function

R with C++ (QtCreator, Windows, Rcpp, RInside)

狂风中的少年 提交于 2019-12-11 04:54:50
问题 I have a problem when it comes to using R within the C++ code. I'd like to create UI in c++ and do all needed calculations in R. So i've found stuff like Rcpp and RInside and even though i've read a lot from Dirk Eddelbuettel's site, i'm not able to compile even the easiest program from examples attached to RInside. Obviously there is a problem with QtCreator config, I've been trying to make it right, but with no success. What i'm asking for would be step-by-step explanation of QT adjustment

RInside installation error

為{幸葍}努か 提交于 2019-12-08 12:56:36
问题 I am trying to make a R development environment in my computer. During last hour, I could successfully install RTools and RCpp. But when I tried the last element RInside package, I get following error. I can see the reason is because g++ or make does not recognize path including space (Program Files -> Files) But how can I change the make file or batter question is ... where is the make file producing following compilation? > install.packages(c("RInside"),type="source") trying URL 'http:/

Compiling RInside program with g++ on Linux

删除回忆录丶 提交于 2019-12-08 09:55:01
问题 I have installed R through RPM (with Yast). anisha@linux-y3pi:~> locate RInside.so /usr/lib64/R/library/RInside/lib/libRInside.so /usr/lib64/R/library/RInside/libs/RInside.so anisha@linux-y3pi:~> locate Rcpp.so /usr/lib64/R/library/Rcpp/lib/libRcpp.so /usr/lib64/R/library/Rcpp/libs/Rcpp.so The file ( rinsidetest.cpp ) that I wish to compile contains: #include <RInside.h> #include <Rcpp.h> int main (int argc, char *argv[]) { RInside R (argc, argv); return 0; } Here's how I compile it: anisha

g++ ld can't find RInside symbols for x86_64 architecture

江枫思渺然 提交于 2019-12-08 08:19:29
问题 I get a linker error saying that symbol(s) cannot be found when I try to compile an RInside sample file with g++. Any assistance would be appreciated. R version 2.13.1 is installed on Mac OS X 10.5. Rcpp and RInside include files have been copied to the usr/include directory. R headers and libraries have been included using the -I and -L modifiers of g++ as shown: $g++ -I/Library/Frameworks/R.framework/Headers -L/Library/Frameworks/R.framework/Libraries rinside_sample0.cpp The rinside_sample0

Saving Lattice Plots with RInside and Rcpp

♀尐吖头ヾ 提交于 2019-12-08 04:58:51
问题 I am trying to build an R application in C++ using RInside. I wanted to save the plots as images in specified directory using codes, png(filename = "filename", width = 600, height = 400) xyplot(data ~ year | segment, data = dataset, layout = c(1,3), type = c("l", "p"), ylab = "Y Label", xlab = "X Label", main = "Title of the Plot") dev.off() It creates a png file in the specified directory if directly run from R. But using C++ calls from RInside, I was not able to reproduce the same result. (

Embedding Stan in C++ application

ⅰ亾dé卋堺 提交于 2019-12-07 10:51:43
问题 I wanted to know whether it is possible to incorporate Stan in another C++ application. Since Stan is also written in C++, there should be a way. Currently, I am using RInside to achieve this but then you have all this data transferring which is time-consuming. 回答1: What specifically did you want from Stan? We're going to separate out the math library into a standalone include for Stan 2.7 --- that contains all the matrix, probability, and autodiff code. Our repos already reflect this

Call R plots from c++ using RInside/ Rcpp

偶尔善良 提交于 2019-12-07 01:11:58
问题 Is it possible to call the plot functions from the c++ ? Currently when I try to do that, the ubuntu terminal sort of freezes for sometime ( may be the duration for which the 3d plot would be created and then rotated for a full 360 degrees) and then unfreezes, without ever popping a new window. Is this the expected behavior or is there something that I am doing wrong ? How can I get the plots ( R graphics ) to run from within c++ using rinside and rcpp ? Thnx -Egon 回答1: Yes, there is a

Saving Lattice Plots with RInside and Rcpp

萝らか妹 提交于 2019-12-06 15:04:51
I am trying to build an R application in C++ using RInside. I wanted to save the plots as images in specified directory using codes, png(filename = "filename", width = 600, height = 400) xyplot(data ~ year | segment, data = dataset, layout = c(1,3), type = c("l", "p"), ylab = "Y Label", xlab = "X Label", main = "Title of the Plot") dev.off() It creates a png file in the specified directory if directly run from R. But using C++ calls from RInside, I was not able to reproduce the same result. ( I could reproduce all base plots using C++ calls. Problem with only Lattice and ggplots ) I used