similar to: loading multiple C files to R

Displaying 20 results from an estimated 10000 matches similar to: "loading multiple C files to R"

2004 Jul 09
1
dyn.load() for windows
Hi, I compiled several C program files on Borland C++ compiler to get one dll output (as instructed in the file readme.package). Now when I try to load this *.dll to R using dyn.load(), then the machine gives the error message "*.dll is not a valid windows data,....". The out put of R is I am working on win2k. What could be the possible reason for that? Thanks, Utsav
2004 Jun 09
5
"attach" in R corr. to Spus one
Hi, I am a newbie to R, just trying to switch from Splus. I am wondering to know if there is any such command in R as "attach" in Splus which can be used to attach the full directory. Also, any idea/referrence about, how to load c functions in R would be highly appreciated. Thanks, Utsav
2004 Jul 12
0
Where does R search when source() ?
I have found the use of save( ) and attach( ) when supported by a pair of functions written by my colleague John Miyamoto, move( ) and rm.sv( ) quite useful in managing (1) collections of useful homebrew functions, (2) project workspaces, and (3) "packages" under development. An .Rdata file containing these and other handy functions together with a brief supporting document can be
2019 Dec 15
1
Request to be allotted a project or a feature in pipeline
To whom it may concern, I'm Utsav Parmar, pursuing my B. Tech in Computer Engineering. I like to work on new technologies and am currently looking for open-source projects to contribute to. As it may turn out, I've got a college project in my curriculum this semester under “Software Development Practice”, and I'd like to work upon a project and/or a feature in pipeline spanning over
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
1998 Nov 18
1
loading fortran with Redhat 5.1
Hi All, I'm running R 0.63 on Redhat 5.1 and when I attempt to load a fortran routine I get: > dyn.load("/home/royle/Rstuff/varna.o") Error in dyn.load(x) : unable to load shared library "/home/royle/Rstuff/varna.o" this function varna.o was compiled with: gcc -c varna.f with no errors or warnings. Does anyone have any thoughts on this? Thanks! (and thanks to
2006 Jun 26
1
Append line 255 character limit issue
Hello All, I have seen some posts about this, but I do not see any clear resolution. Any help would be appreciated. There is a 255 character limit for Append line in pxelinux.cfg --> kernel /proc/cmdline. Can we use another parameter instead of /proc/cmdline? Is there an 'APPEND2' option like 'APPEND'? Can we tftp an additional config file during the pxe process and place
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:
2001 Jul 25
2
using compiled fortran in R
Hi, I would like to use a Fortran subroutine in R. I have checked the R docs and Newsletter, but..., I am unable to load an object file into R. The steps I have taken are (on Debian Linux/recent Intel-type chip ): 1. g77 -c hello.f to create hello.o 2. mymachine> R to start R 3. > dyn.load("hello.o") at which point I am getting the error msg: Error in
1998 Nov 18
2
[jar@oriole.er.usgs.gov: Re: [R] loading fortran with Redhat 5.1]
I can not answer this (message only to me). Certainly, some of you do.. Martin ------- Date: Wed, 18 Nov 1998 13:22:47 -0500 (EST) From: "J. Andy Royle" <jar@oriole.er.usgs.gov> To: Martin Maechler <maechler@stat.math.ethz.ch> Subject: Re: [R] loading fortran with Redhat 5.1 In-Reply-To: <199811181812.TAA26068@sophie.ethz.ch> Hi Martin, The reason I was
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
2010 Feb 12
1
R - Compiling and calling Fortran code that uses IMSL libraries - Help!
Good Afternoon R Help! On of my users is seriously thinking about moving to R from Splus. In his testing, he has already found some benefits to it. He has, however run into one issue, calling his Fortran functions in R. Previously, in Splus, he would do the following: 1. Compile via f90 the *.f program 2. link the object file to the Fortran IMSL libraries via the 'ld' command 3.
2004 Jan 19
1
Compiling R, cannot open vars.mk
Hi! I am trying to compile R-1.8.1 on an alphaserver running Tru64 Unix. I use the compilers cc,cxx and f77. After the compilation I try: make check and get the following message: Make: Cannot open /share/make/vars.mk. Stop. Does anyone have any suggestions on why? Regards Arne Gjuvsland
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
2008 Nov 19
1
C++ code from R
Hi I managed to compile (and use) C code from R, but now I have to use C++ code. After reading "Writing R extensions", I came up with the following code, which compiles fine ------------------- // emdL1_R.cc: #include <time.h> #include <stdio.h> #include "emdL1.h" extern "C" { void emd_L1( double *H1, int *n1, double *H2, int *n2,
2004 Apr 20
2
compile Fortran code which calls C subroutine
I used "R CMD SHLIB" to compile the fortran filename.f file and the filename.so is generated. But since in filename.f it calls another subroutine written in C, i had problem in "dyn.load" because it could not find the C subroutine. I have the .c file but don't know how to tell R about it. How should I compile when I want to call the fortran function
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 =
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