similar to: R package built with Fortran code

Displaying 20 results from an estimated 6000 matches similar to: "R package built with Fortran code"

2005 Nov 17
1
Linking Fortran subroutines
Hi, I just started using R a few weeks ago and have a problem with linking Fortran subroutines to R. For some reasons, I need to compile a Fortran program in R (or Splus) and the whole program consists a couple of subroutines, say, subA and subB. There is no difficulty in linking the subroutines individually, but two subroutines are nested, as shown below, SUBROUTINE subA(arg.) EXTERNAL
2001 May 09
1
Fortran subroutines dblepr, realpr, intpr
I am making my first attempts at using some Fortran code with R, and so far it's going OK. To print from my Fortran programs, it seems I need subroutines dblepr, realpr and intpr. From the excellent "Writing R Extensions" document: "Three subroutines are provided to ease the output of information from FORTRAN code. subroutine dblepr(label, nchar, data, ndata)
2011 May 04
3
Error in .Fortran Call
I have the following FORTRAN code converted to a DLL: ! my_xmean.f90 ! ! FUNCTIONS/SUBROUTINES exported from my_function.dll: ! my_function - subroutine ! subroutine my_xmean(X,N,XMEAN) ! Expose subroutine my_function to users of this DLL ! !DEC$ ATTRIBUTES DLLEXPORT,C,REFERENCE,ALIAS:'my_xmean_'::my_xmean ! Body of my_function DOUBLE PRECISION X(N) XMEAN=0D0 DO J=1,N
2010 Oct 25
2
R-Fortran question (multiple subroutines)
Dear R-helpers, apologies if this is somewhere in a manual, I have not been able to find anything relevant. I run Windows Vista. I have some Fortran code in a subroutine, and have no problem calling this from R with .Fortran, compiling the code either with 'R CMD SHLIB' or independently with gfortran. But is it possible to have more than one subroutine in my source file, one depending
2016 Mar 04
3
ALLOCATE in a FORTRAN subroutine
Hi, I am a FORTRAN developer and I am 'translating' R functions in FORTRAN subroutines. I am 'new' to R. It's my first question in this mailing-list and English is not my natural language. Very often, an R function gives an 'array' as result and you don't have to bother with the dimension of the array : R creates automatically an array with the good length.
2009 Jan 13
2
Using fortran code which call LAPACK subroutines
Hello I'm trying to run a fortran code which use LAPACK subroutines. I think I should use some points shown in the manual 5.5 Creating shared objects but it is too technical for me :-(... Could anyone help me for the procedure to do: -which part of the manual is relevant for this type of question? actually I'm speaking from writing R extensions, should I read R admin? -point 1.2
2011 Jun 08
2
Questions about building R packages
Hello R users, I have difficulties when trying to make R packages. I tried to read many tutorials but still could not find out the right way. Could any one help me out please? (I'm using Windows xp.) After running package.skeleton() and edit those RD files, I don't know how to use Rtools (or CMD shell?) to build the zip file. I installed the Rtools from Murdoch's link, but it
2010 Dec 09
1
How to call DBLEPR in Fortran code to be used by R
Hi I've built a dll using Fortran code and can call it by either R or Fortran. Calling by the former gives me the wrong answer and the later gives the correct answer. From what I've read, it looks like I should use the subroutines DBLEPR, INTPR and REALPR to get values to show up in R which I hope will allow me to find the error. I've downloaded the R-2.12.0.tar.gz but have
2009 Jun 01
2
Calling Fortran from C++
Hi, can anybody point me to a package with C++ code that call Fortran subroutines? I am trying to do the same thing but we scarce success. Error in dyn.load("utils.so") : unable to load shared library 'utils.so': dlopen(utils.so, 6): Symbol not found: _robcovf Referenced from: utils.so Expected in: dynamic lookup [[alternative HTML version deleted]]
2010 Mar 24
1
Fortran DLLs and R
Hi All, I'm writing R code that would benefit from doing certain tasks using compiled blocks of code, specifically Fortran subroutines of my own (already written, debugged in both Fortran77 and Fortran90). I am currently working on a Windows machine using Lahey and/or MinGW(g77) compilers. It is possible to dynamically load Fortran DLLs into R as evidenced from the several documents
2000 Nov 13
1
DLL for calling Fortran subroutines
Hi everybody, I'm trying to use fortran subroutines in a R function. I've generated a DLL file using my fortran subroutines, and I've got a DLL which includes an export table with the names of my subroutines. Then, I use the R command library(test), where test is a directory located in the R library tree and which contains a R directory (with my R functions) and a libs directory (with
2001 Oct 08
1
.Fortran()
I am trying to call some Fortran subroutines using .Fortran(). These subroutines have arguments of type 'character', 'real', 'integer', and 'integer*2'. Is it impossible to call subroutines expecting both 'character' and 'real' as input? Any help is appreciated. John Bjornar Bremnes Norwegian Meteorological Institute
2012 Oct 20
1
Trouble returning 2D array into R from Fortran
Hello, I have been trying to use a collection of Fortran subroutines to return a 2D array of calculated values to my R code, calling a Fortran wrapper subroutine from R. I've done this successfully before with C & C++ code. The Fortran wrapper subroutine which is to be called by R takes a set of input arguments & then should return an array of 2 columns & the specified number of
2005 Sep 09
2
A question on R memory management in .Fortran() calls under Windows
Dear R community, I have a question on how R manages memory allocation in .Fortran() calls under Windows. In brief, apparently, it is not possible to allocate large matrices inside a Fortran subroutine unless you pass them as arguments. If you do not act in this way RGUI crashes with a stack overflow error and acting on memory through vsize nsize ppsize and memory.limit does not help at all.
2009 Apr 15
1
Compiling Fortran Subroutines as R Shared Objects on Mac OS-X
Hello, I am trying to compile some F77 subroutines as shared objects for R on my Mac. --> Mac OS-X Version 10.4.11 (Tiger Intel Mac) I have done this (successfully) before on Sun Solaris and Linux Fedora systems using the following command. > R CMD SHLIB myfile.f I have g77 installed from this page. http://hpc.sourceforge.net/ I am using R 2.8.1, and I have installed all 4 additional
2004 Oct 22
1
building an R package : where and how should my fortran library be loaded ?
Hi , I'm currently trying to make available a few fortran subroutines and R functions (which make interface to these subroutines), as an R package. I'm doing it under linux with R 1.9.0 (but hope to do it for windows too). I have trouble for loading my fortran code. Here are the steps involved : 1) In R: # Create tree for package
2011 Nov 03
0
[LLVMdev] Proposal: MCLinker - an LLVM integrated linker
A helpful link-time optimization would be to place subroutines that are used close together in time also close together in the executable file. That also goes for data that is in the executable file, whether initialized (.data segment) or zero-initialized (.bss). If the unit of linkage of code is the function rather than the compilation module, and the unit of linkage of data is the individual
2014 Oct 14
1
Do subroutines need their own h extension?
Hi all, According to the documentation ( http://www.voip-info.org/wiki/view/Asterisk+h+extension): Be aware: Macros require their own h extension as they do not make use of the calling context's h extension! Does this apply to subroutines too? I am unable to find the corresponding explanation. If not: what happens when a call is hanged-up during the execution of a subroutine? Is the h
2011 Nov 03
1
[LLVMdev] Proposal: MCLinker - an LLVM integrated linker
On Wed, Nov 2, 2011 at 11:05 PM, Don Quixote de la Mancha <quixote at dulcineatech.com> wrote: > A helpful link-time optimization would be to place subroutines that > are used close together in time also close together in the executable > file.  That also goes for data that is in the executable file, whether > initialized (.data segment) or zero-initialized (.bss). > > If
2012 Mar 06
2
Calling FORTRAN function from R issue?
Hello, I am trying to call the BLAS Level1 function zdotc from R via a .C call like this: #include "R.h" #include "R_ext/BLAS.h" void testzdotc() { Rcomplex zx[3], zy[3], ret_val; zx[0].r = 1.0; zx[0].i = 0.0; zx[1].r = 2.0; zx[0].i = 0.0; zx[2].r = 3.0; zx[0].i = 0.0; zy[0].r = 1.0; zy[0].i = 0.0; zy[1].r = 2.0; zy[0].i = 0.0; zy[2].r = 3.0;