similar to: R-extension in unix system -- help to locate header files

Displaying 20 results from an estimated 5000 matches similar to: "R-extension in unix system -- help to locate header files"

2009 Jun 12
1
Can't get F77_CALL(dgemm) to work [SEC=UNCLASSIFIED]
Hi I am new to writing C code and am trying to write an R extension in C. I have hit a wall with F77_CALL(dgemm) in that it produces wrong results. The code below is a simplified example that multiplies the matrices Ab and Bm to give Cm. The results below show clearly that Cm is wrong. Am= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Bm= 1 1 1 1 1
2004 Jun 22
3
[Q] GET_DIM() crash on Windows only
I have the following contrived code in package format. On Solaris and Mac OS X, code runs just fine. On Windows, it crashes the R environment with the "Send Bug Report" dialog. I tried R 1.8.1 (Win2K) and R 1.9 (WinXP) binaries with the same result. PCs otherwise appear properly configured for creating R packages. Anything blatantly wrong? Suggestions? TIA Relevant files from package
2005 Dec 21
1
linking C and R
hey, I am running R 2.0.1 on a the terminal of my MAC OS X and I have written some C code that I would like to use dynload to bring into R. When I try to compile the code i get the error R.defines.h no such file or directory. I know that the file is in resources/include but where do I have to move the file to so that the compiler can access it? I tried copying Rdefines.h and R_ext folders
2013 May 24
1
Problem with Rboolean in c++ code
I am trying to use R_RegisterCFinalizerEx to ensure some c++ object is properly deleted after use. However, I run into some problems when trying to pass in the third argument which is an Rboolean. The line 'R_RegisterCFinalizerEx(p, finalizer, TRUE);' generates the following error when trying to compile using R CMD SHLIB: g++ -I/usr/share/R/include -DNDEBUG -fpic -O2 -pipe
2009 Dec 26
1
Problem compiling R library on FC4 ( conflicting declaration in Rinterface.h and stdint.h)
Hello, The package builds successfully on RHEL5 and OS X( 64 bit,32/64 respectively) but on FC4(32 bit) it fails with this error g++ -m32 -I/usr/include/R -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I. -g `pkg-config --cflags protobuf` -Wall -c
2009 Jan 08
1
Callbacks seems to get GCed.
Dear list, I am trying to implement a publish-subscribe mechanism in for an embedded R interpreter. But somehow my registered closures seem to get collected by the GC, even though I have protected them. I have reducted my code to the following sample. Sorry if it is a little verbose. The first couple of call of calls still work, but at some point one of the callbacks (callback1 in my
2004 Mar 19
1
R_qsort_int_I() error
Hi, I want to use R_qsort_int_I() in my C function, but getting the following error. It looks like there is a conflict between Rmath.h, which I use to generate random numbers, and R_ext/Boolean.h I would appreciate any help to fix this problem. gcc -ansi -g -o Gibbs gibbs.c subroutines.o rand.o vector.o -lm -lRmath -llapack -lblas -lfrtbegin -lg2c -lm -shared-libgcc In file included from
2000 Mar 08
1
installing package in Windows
Could you help me in getting a package to compile from source in Windows? I'm running Windows NT 4.0 on a pentium 450 with 128 Mb of Ram. I've got R 1.0.0. I am developing a package for R which includes a bit of C code. I have things working in Unix just fine, and now I want to port it to Windows NT. I've been following the instructions in the R complements to Venables and
2007 Apr 03
3
Strange number produced by dnorm
Hi All, I just started to learn compiling C codes for R usage, and got a problem when I was playing with my 'hello world' code. #include <R.h> #include <Rdefines.h> #include <Rmath.h> SEXP test( ) { double x; x=dnorm(1.0,0.0,1.0,1); printf(" x value is: %d \n",x); return(R_NilValue); } I got the result : x value is: -466460838 Could
2009 Sep 03
1
Running an expression 1MN times using embedded R
Hello, I'm evaluating this expression expression({ for(x in 1:5){ .Call('rh_status','x') }}) a million times from a program with R embedded in it. I have attached reproducible code that crashes with Program received signal SIGSEGV, Segmentation fault. 0x00002b499ca40a6e in R_gc_internal (size_needed=0) at memory.c:1309 1309 FORWARD_NODE(R_PPStack[i]); Current language:
2009 Feb 20
1
C function calling in R
Dear all, I have a problem in calling my C code from R. If I do not need to use #include<R.h>, the codes work properly. But when I need to use it, my codes produce an error as: logpostCLM.cpp:7:15: error: R.h: No such file or directory logpostCLM.cpp:8:24: error: Rinternals.h: No such file or directory logpostCLM.cpp:9:19: error: Rmath.h: No such file or directory logpostCLM.cpp:10:24:
2007 Feb 13
2
anyone has C++ STL classes stability issue if used with R
Hello, is there any one who uses C++ STL classes when programming shared libs for R and has had any problems with STL? In the very simple example below I am constantly getting segfaults when trying to populate the queue. The segfault occurs at what looks like a random index in the loop when pushing another element to the queue. Reproduced on 4 machines. Object x is an Image as in EBImage,
2015 Apr 09
3
typo in R-exts.html section 6.9
In 'Writing R Extensions' section 6.9 there is the paragraph There are interfaces (defined in header R_ext/Applic.h) for definite and for indefinite integrals. ?Indefinite? means that at least one of the integration boundaries is not finite. An indefinite integral usually means an antiderivative, not an integral over an infinite spread. Should that first sentence end with 'for
2006 Mar 29
1
calling R's optimization routines from C
Hi, I have read R's Writing Extensions manual and am still confused about how to use some of the routines there when I call from C. Specifically, I am writing a little test function which I will optimize using the nmmin function which underlies R's optim() with Nelder-Mead. I guess I wonder what library/header files I should be using. I was using R_ext/Applic.h and linking with libR but I
2003 May 16
1
Reloading a shared library with dyn.load
Hi, I'm using dyn.load to load a shared library (compiled from C code) into R. If I dyn.unload it and then dyn.load it again, I get an hourglass icon in Rgui (R 1.7.0, Win 2000), and it just sits there forever. I can't press Escape to stop the current computation, but I can close Rgui without resorting to using the Task Manager. Is it a problem with my use of R_alloc? Do I need
2002 Feb 20
1
Pivoting in chol
Hi Everyone, I have modified my version of R-1.4.1 to include choleski with pivoting (like in Splus). I thought R-core might consider including this in the next version of R, so I give below the steps required to facilitate this. 1. Copied Linpack routine "dchdc.f" into src/appl 2. Inserted line F77_SUBROUTINE(dchdc) in src/appl/ROUTINES 3. Inserted "dchdc.f" into
2010 Jun 02
1
Help - C Compiler
Dear Group Members, First of all thanks for all the great work and effort. I am trying to compile a part of the Project R, 'pnorm.c' in visual studio 6.0 c++ language. First i downloaded the standalone R-2.11.0 and tried to compile it. Some files were missing here such as 'Rconfig.h'. Then i downloaded the Binary for Windows, and in the installation folder i found those missing
2013 Jul 04
1
R-devel Digest, Vol 125, Issue 2
Hi all, I have a problem but i am not sure that this is the right mailing list. I'm writing a R program which call a C++ program, through the function .Call. I use to compile the c++ script with the command R CMD SHLIB SpTempWrapC.cpp -Wall -l covmodel.h -l util.h Everything works fine since, for mistake, i paste in the terminal the content of the r-script. Now, when i try to compile,
2007 Sep 17
3
Call C code from R
Hello, All! I'm new for R-devel list. And I'd like to ask some questions, maybe they will be stuped for the most part of members of the list. I need to call function which is written in C++ from R. My questions are: 1. How should I include libraries (for example, iomanip, sstream, iostream)? 2. Can I use namespace? Thanks All :) Olga
2008 Oct 08
1
error installing lattice package
I just updated my Redhat EL systems to R-2.7.2, and tried to update my packages as well. Lattice is one that failed. What do I need to do? R version 2.7.2 (2008-08-25) > install.packages("lattice", repos = "http://cran.fhcrc.org/") Warning in install.packages("lattice", repos = "http://cran.fhcrc.org/") : argument 'lib' is missing: using