Re: [R] adding FORTRAN code to a package

2010-08-03 Thread Ray Brownrigg
On Wed, 04 Aug 2010, Erin Hodgess wrote: > Thank you! > > Now, here is the code for the FORTRAN subroutine: > subroutine cov1(n1,na,x,z,yy,ac) > integer n1,na > real x(n1),ac(na+1),z,yy > do 5 j=1,(na+1) > do 10 i=1,(n1-j) > if(j.eq.1)ac(j)=yy >

Re: [R] adding FORTRAN code to a package

2010-08-03 Thread Erin Hodgess
Thank you! Now, here is the code for the FORTRAN subroutine: subroutine cov1(n1,na,x,z,yy,ac) integer n1,na real x(n1),ac(na+1),z,yy do 5 j=1,(na+1) do 10 i=1,(n1-j) if(j.eq.1)ac(j)=yy if(j.ne.1)ac(j)=ac(j)+(x(i)-z)*(x(i+j-1)-z) 10

Re: [R] adding FORTRAN code to a package

2010-08-03 Thread Uwe Ligges
I assume you will need .Fortran("cov1", .., PACKAGE="RcmdrPlugin.push") if the fortran code is in your package. Best, Uwe Ligges On 03.08.2010 05:54, Erin Hodgess wrote: Dear R People: Hello! I'm putting together another RcmdrPlugin package and need to add a FORTRAN subroutine to speed