Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Remko Duursma
Hi Berwin and all others who replied: that did the trick, thanks for your help! remko > Actually, it turns out that this example is simplified enough. :) > > I put this snippet into a file, compiled it via "R CMD SHLIB", loaded > it into R and then was very surprised about the result of ".Fort

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Berend Hasselman
e everything to be implicitly > of type character and then let the fun begin) and then to explicitly > declare all variables to be of the appropriate type. > I alway look for a command line option for the fortran compiler to achieve the "implicit none". gfortran has the option -f

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Berwin A Turlach
G'day all, On Mon, 25 Oct 2010 06:52:15 -0400 Duncan Murdoch wrote: > Remko Duursma wrote: [...] > > I.e, my code looks something like this: > > > > subroutine f(x,y,z) > > > > call g(x,y,z) > > > > end > > > > subroutine g(x,y,z) > > > > z = x*y > > > > end > > > > > > calling this from

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Duncan Murdoch
Remko Duursma wrote: 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

Re: [R] R-Fortran question (multiple subroutines)

2010-10-25 Thread Berwin A Turlach
G'day Remko, On Mon, 25 Oct 2010 15:33:30 +1100 Remko Duursma wrote: > apologies if this is somewhere in a manual, I have not been able to > find anything relevant. You probably have to set some appropriate flags and the information should be somewhere in the manual of your compiler. Though, "

[R] R-Fortran question (multiple subroutines)

2010-10-24 Thread Remko Duursma
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 gfo

Re: [R] fortran question

2008-05-30 Thread Prof Brian Ripley
Rtools28 does not contain g77 to my knowledge (that is, it did not in the version I last downloaded). But it does contain dllcrt2.o. The Fortran compiler is gfortran. I think you have another GCC toolset in your path. On Fri, 30 May 2008, Edna Bell wrote: Hi R Gurus: I have used the foll

[R] fortran question

2008-05-30 Thread Edna Bell
Hi R Gurus: I have used the following in the past: g77 -O2 -c test.f g77 -shared -o test.dll test.f with success. Now I'm getting ld: dllcrt2.o no such file I have the latest version of Rtools28.exe Any suggestions would be much appreciated. Sincerely, Edna Bell _