similar to: Fortran Code to R Code

Displaying 20 results from an estimated 5000 matches similar to: "Fortran Code to R Code"

2007 Nov 15
1
R Help
Ya, I was wondering if anyone knows how to use R and can do some computing with it. I have a problem that involves implementing the EM Algorithm for censored normal data. So I was wondering if anyone knows how to code a problem involving the EM Algorithm in R, and then estimate the parameters, mean, standard deviation, and estimated variance covariance matrix for certain data given. If you do
2008 Oct 24
4
gfortran optimization problems
Colleagues, I have a routine in package labdsv that calls a FORTRAN subroutine. Recently, I was informed that it sometimes gives different results on a PC and Mac, and that the PC version is clearly wrong. I tested it on linux (because I don't have a PC), and I get the same (incorrect) behavior as the PC. Simply by inserting debug WRITE statements in the FORTRAN I would get different,
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
2006 May 23
2
transpose dataset to PC-ORD?
Hello: I need to take a species-sample matrix and transpose it to the format used by PC-ORD for analysis. Unfortunately, the number of species is very large (>5000), and so this operation cannot be performed simply in an application like Excel, which has a 255 column limit. So, I wrote relatively simple code in R that I hoped would do this (appended below). But there are glitches. The
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)
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]]
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.
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
2012 Feb 21
1
R package built with Fortran code
Hi R users, I'm trying to build an R package and most of the work have been done in Fortran programming. I looked for help for a while and seems like R can only call Fortran subroutines. Now my fortran code has modules, subroutines and main program. Is there anyway that R can call such fortran programming? Or I should modify the coding and form them into subroutines before let R call them?
2000 Feb 02
1
(not) compiling fortran -- dynamic loading problem
Hi, everyone. This may be properly a fortran question rather than an R question. I'm trying to add a few print statements to otherwise working fortran code in one of the libraries so I can see what's going on in the code. I have no problem doing so on an SGI machine, but under LinuxPPC I've run into a problem. The code compiles and creates a shared object (.so), but when I issue
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
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
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 Feb 13
2
Generate random numbers in Fortran
Hi!!! It would like to know if it exists a form to use the functions to generate variates in FORTRAN with the same easiness I use that them in C? Or not? If yes. They would have some example? I would like to use the functions rbeta, rlnorm and others! Sorry my english..rsrsrs Thanks!!!              Fábio Mathias Corrêa    University Federal of the Lavras - Brazil Veja quais são os
2014 Jan 11
1
Fortran BLAS giving bad results
Hello r-devel, When compiling Fortran code containing BLAS functions and calling it using dyn.load, I am getting incorrect results. A small example with which I can reproduce the problem is below. I am running on OSX Mavericks (upgraded R, Xcode, etc per instructions on this list), but I do not think it is related since the check on my "blupsurv" package on r-forge seems to be showing
2010 Jun 18
3
Use of .Fortran
I have no experience with incorporating Fortran code and am probably doing something pretty stupid. I want to use the following Fortran subroutine (not written by me) in the file SSFcoef.f subroutine SSFcoef(nmax,nu,A,nrowA,ncolA) implicit double precision(a-h,o-z) implicit integer (i-n) integer l,i,nmax double precision nu,A(0:nmax,0:nmax) A(0,0) =
2010 Jun 18
3
Use of .Fortran
I have no experience with incorporating Fortran code and am probably doing something pretty stupid. I want to use the following Fortran subroutine (not written by me) in the file SSFcoef.f subroutine SSFcoef(nmax,nu,A,nrowA,ncolA) implicit double precision(a-h,o-z) implicit integer (i-n) integer l,i,nmax double precision nu,A(0:nmax,0:nmax) A(0,0) =
2004 Jan 19
1
memory limitation with Fortran interface
Hi, I'm using R 7.0 under Linux as a programming interface to Fortran (g77 v0.5.24). Basically, what I want to do is to call a fortran subroutine of mine which performs MCMC computations. Apparently I'm getting into memory management problems. To track the problem I wrote the following small Fortran subroutine (saved as test.f) : subroutine test(n,p) implicit none
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