similar to: include libraries for C code called from R

Displaying 20 results from an estimated 200 matches similar to: "include libraries for C code called from R"

2006 Dec 12
1
Undefined symbol when trying to dyn.load a shared object
I hope that someone reading this list can offer some suggestions on how I can incorporate external C libraries in C functions that I want to call from R. I have gone through all of the documentation, help files and mailing list archives and have not been able to find a satisfactory solution. I have constructed a simple example of the problem, since my "real" program is much more
2008 Aug 16
4
Lattice: problem using panel.superpose and panel.groups
Hi. I'm embarking on my first attempt at creating my own panel function for lattice graphics, and despite all of my online research and pouring through the documentation, I cannot figure out how to solve my particular problem. Hopefully, a generous fellow R user can help. I have some data that is split into two groups: some "actual" data, and some simulated data,
2007 Sep 16
1
Using gsl libraries in R packages
I have some compiled C code that I call from R, and I would like to distribute this code as an R package through CRAN. In the C code, I use the gsl numerical libraries, mainly for the BLAS interface, some linear algebra functions, and some optimization routines. As I prepare this code to conform to the specs for R packagtes, I am wondering if there is a restriction on the use of external
2008 Nov 20
3
Turning off compiler optimization
Hi. I am writing some code in C that I would like to link into R. My Makevars file is: PKG_CPPFLAGS=-I/usr/local/include PKG_LIBS=-L/usr/local/lib -lgsl PKG_CFLAGS = -Wall -O0 -g -p -pg The source file is core.c,. and I am compiling using R CMD SHLIB core.c The output is gcc -arch x86_64 -O3 -g -p -std=gnu99 -I/Library/Frameworks/ R.framework/Resources/include
2016 Nov 01
2
libgsl.so.0
On 01/11/16 21:08, Kirill M?ller wrote: > Did you reinstall the gsl package [1]? Apparently not. I did a complete update.packages() which reinstalled a great number of packages (I have a great number in my personal library). There were complaints about 4 packages, one of which was "copula", but "gsl" was not one of them. I would have *thought* that if "gsl"
2016 Nov 01
2
libgsl.so.0
I have just upgraded to the latest R (3.3.2) and thought I should update my library of contributed packages. Ran into problems with "copula". Got the error: > Error in dyn.load(file, DLLpath = DLLpath, ...) : > unable to load shared object '/home/rolf/Rlib/gsl/libs/gsl.so': > libgsl.so.0: cannot open shared object file: No such file or directory So after a bit
2004 Sep 09
3
Dyn.load of sharing object with GSL library
Following the recommendation of Prof. Ripley, I have created the Makevars file with the line: PKG_LIBS="-L/usr/lib/libm -lm -L/usr/local/lib/libgsl -lgsl -L/usr/local/lib /libgslcblas -lgslcblas" in the working directory. Now I have the code file Example3.c which computes the Bessel function value (the example is taken from the GSL reference book). I am running: R CMD SHLIB Example3.c
2007 Jan 04
1
Parameter changes and segfault when calling C code through .Call
I am experiencing some odd behavior with the .Call interface, and I am hoping someone out there can help me with it. Below is a simple example (in that there are R packages that do exactly what I want), but this code illustrates the problem. Thanks in advance for any help you can provide. Suppose I want to compute the log density of a multivariate normal distribution using C code and the gsl
2008 Jan 25
4
Problem building R with Intel MKL v10 BLAS
NO Hi. I'm not sure if this is an R-help or R-devel problem, so I'm starting here in the hope that someone can help (and willing to go to the other list if it's more appropriate). I think I am following all of the instructions in the various manuals, but clearly I am missing something. I have an Intel EM64T Dell with 2 dual-core Xeon processors running Red Hat EL5. I would
2009 Nov 20
1
how to link C code with gsl from R CMD and dyn.load
Hi, I am writing a function in C that is meant to be called by R. In the C function, I used a gsl function gsl_stats_mean. The code is as simple as below void gsl(double *m, int *dim){ int r, c; r = dim[0]; c = dim[1]; double mean = gsl_stats_mean(&m[0], 1, r); Rprintf("mean = %f\n", mean); } The C code is succesfully compiled and the output is as follows. $ R CMD SHLIB
2009 Apr 05
2
Problem with Dynamo-Package
Good day, I am facing a problem when I am installing the dynamo-package and loading it. After I installed the package, I received the following warning message: "In file.create(f.tg) : cannot create file 'C:\PROGRA~2\R\R-28~1.1/doc/html/packages.html', reason 'Permission denied'" and when I load the package, an error message pops up saying that "the application
2004 Sep 09
1
Adding GSL library path to SHLIB
Dear R-list people, I asked a similar question a few hours before. I will try to be more specific. We like to add the GSL library to the file SHLIB in order to make it possible to run the C code using GSL functions from R. We read that the path to the libgsl.a should be added to the line shlib_libadd=' ' in the file SHLIB but it does not work on our system. Dyn.load fails with error
2002 Apr 16
1
Problem with dyn.load()
I tried to dynamically load a c++ function. Everything seems to be OK when dyn.load() is executed but then I get this error Error in .C("integral", sumInMean, sumInVar, boundError, numberSampleClasses, : C/Fortran function name not in load table The code of the function is something like this: #include <cmath> extern "C" { #include
2010 Oct 30
1
Trouble installing gsl wrapper
Hi, I'm trying to install the gsl wrapper source code (http://cran.r-project.org/src/contrib/gsl_1.9-8.tar.gz) on a Linux system (OpenSuse 11.1), but encountering the following problem. I've already installed 'gsl' version 1.14 (ftp://ftp.gnu.org/gnu/gsl/gsl-1.14.tar.gz) on the system. What's missing? Thanks a lot... > R CMD INSTALL gsl * installing to library
2007 May 29
1
Use of Rf_duplicate
First, thanks to those of you who responded to my previous post about my code that was taking longer and longer to process. After following your suggestions, and I now thinking that the problem was some calls to Rf_duplicate in my C code. So I'm hoping I could get some clarification on what Rf_duplicate actually does. What is the real difference between PROTECT(y=x); and PROTECT (y =
2012 May 03
0
Modified Cholesky decomposition for sparse matrices
I am trying to estimate a covariance matrix from the Hessian of a posterior mode. However, this Hessian is indefinite (possibly because of numerical/roundoff issues), and thus, the Cholesky decomposition does not exist. So, I want to use a modified Cholesky algorithm to estimate a Cholesky of a pseudovariance that is reasonably close to the original matrix. I know that there are R packages that
2012 Jul 24
1
Trouble with Installing R Package gsl
Dear R users: I have a problem when installing the R package *gsl*. The procedure is as follows: (1) Since it needs a GSL vesion >=1.12, and the GSL library on the serve I use is too old, I download GSL 1.15 and install it in my own account, such as $HOME/local/gsl. Because I do not have root access, so it cannot be installed in standard folder. (2) Then I download the source code of R
2007 May 25
2
R scripts slowing down after repeated called to compiled code
Thanks in advance to anyone that might be able to help me with this problem. I have not been able to find a reference to it in the documentation on online sources, so I am turning to this group. I am running R 2.4.1 under Red Hat Enterprise Linux 4, on an x86_64 platform (multi-core Intel Xeon processors, 3.6Ghx, 8GB of RAM). I have some rather complicated code (so I won't attach it here),
2006 Dec 24
2
FW: Passing lists from R to C, extracting elements, and sending lists back again
Thank you to everyone who responded to my previous post regarding the integration into R of C programs that use external libraries. I have another issue that I simply have not been able to figure out using documentation, list archives, and so forth. I have data that is stored in R lists. I would like to pass the list to C code using the .Call function, perform mathematical operations on the
2012 Aug 17
2
R package compilation: files in src directory should be ignored if C library is not available
I have written an R package which contains C source code (in the directory pkg/src). Only a subset of the functions in the pkg/R directory contain a .C() call to the functions in the pkg/src directory. The rest of the package will still work and be useful without the functions containing a .C() call. To compile the code in pkg/src requires the GSL library. This is detailed in the