similar to: question about loading shared objects into R

Displaying 20 results from an estimated 20000 matches similar to: "question about loading shared objects into R"

2006 Jul 11
0
Assistance with dll's to use with dyn.load
After having browsed the documentation for a while without discovering what I am looking for, maybe one of you would know ... What I want to do: I have two fortran files MC.f and ESCA.f. In MC.f there is a call to a routine called lpost. This routine (lpost) is defined (among other things) in ESCA.f. Under linux, I can do the following: R CMD SHLIB MC.f and R CMD SHLIB ESCA.f followed by
2010 Jan 29
1
shared object location
hi all, i posted a question before about this, but i may have been too cryptic to understand. in short, there exists an R package that someone is writing. this package depends on a custom library (written in C,), compiled as a shared, and called by the package's functions via the .Call(...) method. we are testing out different code implementations of the compiled library functions, and thus
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
2009 Jan 10
2
Problem with compiling shared C/C++ library for loading into R (Linux)
I am using the .Call interface to call c++ code from R. For that, I am trying to create a dynamic library (mylib.so) using "R CMD SHLIB" by linking my own c++ code and an external c++ library (blitz++). The makefile works fine on my Mac, produces mylib.so and I am able to call .Call() from R, but on a linux server (I think Debian), I got the following error: ---------- /usr/bin/ld:
2009 Jan 10
2
Problem with compiling shared C/C++ library for loading into R (Linux)
I am using the .Call interface to call c++ code from R. For that, I am trying to create a dynamic library (mylib.so) using "R CMD SHLIB" by linking my own c++ code and an external c++ library (blitz++). The makefile works fine on my Mac, produces mylib.so and I am able to call .Call() from R, but on a linux server (I think Debian), I got the following error: ---------- /usr/bin/ld:
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
2001 Sep 14
1
Dynamic loading problem.
I'm having a dynamic loading problem that seems to be caused by exponentiation (the ** operator in Fortran/ratfor). This can be illustrated by the following toy example: ===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+=== % cat foo.r subroutine foo(x,n) x = x**n return end % f77 -c foo.r /tmp/ratfor.06661.0.f: foo: % R CMD SHLIB -o foo.so foo.o gcc -G -o
2005 Jun 30
0
Relationship between dyn.load and library.dynam
I am a little confused about the relationship between library.dynam and dyn.load >From the documentation: library.dynam(chname, Load the specified file of compiled code if it has not been loaded already, or unloads it. Where chname is a character string naming a shared library to load. and dyn.load(x, local = TRUE, now = TRUE) Load or unload shared libraries, and test whether a C function
2005 May 01
0
dll symbol loading: possible bug
Dear R-devel, I think the following describes a bug in R. It seems to be associated with dyn.load() and/or something that happens at start-up. I have not filed a bug report yet (because I doubt my ability to rule out other explanations) but would happily do so if requested. Observation: If two dlls are loaded as a result of dyn.load() calls in .Rprofile, subsequent calls to dyn.load()
2009 Sep 04
0
passing character vectors to FORTRAN
Hi, I've been trying to pass a character vector from R to a FORTRAN subroutine. There have been several posts discussing this issue (e.g. http://tolstoy.newcastle.edu.au/R/help/98a/0547.html, http://tolstoy.newcastle.edu.au/R/help/05/10/13558.html, http://tolstoy.newcastle.edu.au/R/help/01a/2577.html, http://tolstoy.newcastle.edu.au/R/help/01c/1795.html,
2012 Nov 08
2
unable to load shared object - opencv
Hi all i'm trying to use the opencv's function into R. i wrote a simple script, just for try to understand how use c++ in R, it loads an image and write it with a different name (i know it ), and then write "Hello, World". The file is names prova2.cpp (is the first time i try to use c++ ) #include <stdio.h> #include <opencv/cv.h> #include
2010 Jun 18
3
C interface
Greetings, I am trying to call simple C-code from R. I am on Windows XP with RTools installed. The C-function is #include <R.h> #include <Rinternals.h> #include <Rmath.h> #include <Rdefines.h> // prevent name mangling extern "C" { SEXP __cdecl test(SEXP s){ SEXP result; PROTECT(result = NEW_NUMERIC(1)); double* ptr=NUMERIC_POINTER(result); double t =
2010 Jun 18
4
C Interface
Greetings, I am trying to call simple C-code from R. I am on Windows XP with RTools installed. The C-function is #include <R.h> #include <Rinternals.h> #include <Rmath.h> #include <Rdefines.h> // prevent name mangling extern "C" { SEXP __cdecl test(SEXP s){ SEXP result; PROTECT(result = NEW_NUMERIC(1)); double* ptr=NUMERIC_POINTER(result); double t =
2005 Oct 26
0
pb with dyn.load
Hi, here are a couple of strange things happening with R.2.2.0 compiled under Mandrake-10.1 At the begining of the story I have segmentation fault using package RandomFields in conjuction with some Fortran code of mine loaded with dyn.load. One of my fortran programs contains a subroutine named fstat Trying to trace , I simplified the sequence as much as possible and I end up with the the
2006 Nov 15
4
dyn.load (PR#9364)
Full_Name: Jonathan Tuke Version: 2.4.0 OS: Mac OS X 10.4.8 Submission from: (NULL) (203.173.46.189) I am writing C code to implement in R. I am using R CMD SHLIB and then dyn.load("file.so"). The function I then call with .C("function"). Since I installed the latest R version, I have found that if I alter my C code and recompile, then use dyn.load("file.so"), the
2005 Oct 26
1
pb with dyn.load - fortran code now attached
Hi, here are a couple of strange things happening with R.2.2.0 compiled under Mandrake-10.1 At the begining of the story I have segmentation fault using package RandomFields in conjuction with some Fortran code of mine loaded with dyn.load. One of my fortran programs contains a subroutine named fstat Trying to trace , I simplified the sequence as much as possible and I end up with the the
2011 Apr 20
2
Include C++ DLL, error in ...: C symbol name not in load table
Hello R experts I am googling and reading around, however, I can't get it working (perhaps because I do not understand much C, however, I'll give it a try). I am trying to include C++ code into an R routine, where the C++ code looks: #include <iostream> using namespace std; void foo (double* x, double* y, double* out) { out[0] = x[0] + y[0]; } Back in R, the command R CMD
2001 Oct 11
3
Underscores and Fortran code
This might more properly be filed as a bug report, but ... I came upon the following problem while trying to dyn.load a library of Fortran code into R. I'm running RedHat 7.1 on a Pentium III laptop, with R version 1.3.1 (latest rpm from CRAN) and gcc/g77 version 2.96. My library has a number of Fortran subroutines that have underscores in their names for readability. By default g77
2010 Nov 03
1
dll problem with C++ function
Dear fellow R-users, I have the problem of being unable to repeatedly use a C++-function within R unless by dyn.unloading/dyn.loading it after each .C call. The C++-code (too large to attach) compiles without problem using R CMD SHLIB. It loads (using dyn.load("myfun.so")) and executes (via .C(myfun, ...) ) properly. The function returns no object, only reads files from disk,
2012 Sep 20
1
R/C++ interfaces: crashes when using .c(), followed by correct results when R restarted
Dear all I have written a function in C++ , equil_distC, that I am calling from an R script. In the last few days, R has repeatedly crashed when calling this function, or delivered obviously wrong outputs. However, when I restarted R after the crash, the results turned out to be OK most of the time although I had not modified the C++ code. Although the code runs correctly now, I am not sure