R.version gives the following output

> R.version
               _
platform       x86_64-unknown-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status
major          2
minor          6.0
year           2007
month          10
day            03
svn rev        43063
language       R
version.string R version 2.6.0 (2007-10-03)


If you see my previous email, I did try .Fortran with removing the last
underscore, and I still got the same error. I made the .so file using the
f95 compiler. In fact, 'nm *.so | grep xtabs', did show up the the name
"merge_xtabs_patterns_file_ ".  I am using f95 because my source code is
written in f90.




Interestingly, doing the same works on another machine, even though the f95
compiler on the two machines is the same. R.version on that machine gives:
> R.version
               _
platform       i686-pc-linux-gnu
arch           i686
os             linux-gnu
system         i686, linux-gnu
status
major          2
minor          6.2
year           2008
month          02
day            08
svn rev        44383
language       R
version.string R version 2.6.2 (2008-02-08)



So, I am now wondering if this is a problem with the older version of R
which has now being fixed.

Please comment.

Thanks,
A




On Sat, May 24, 2008 at 2:30 AM, Prof Brian Ripley <[EMAIL PROTECTED]>
wrote:

> The problem is that underscore is an illegal symbol in a Fortran 77 name
> (and R only requires a Fortran 77 compiler).
>
> You have not told us your OS nor R version nor compiler+version (because
> what a compiler does with this is a compiler-specific extension).
>
> You should not be using the trailing underscore in .Fortran, so the failure
> was correct.
>
> Some changes have been made fairly recently, and my belief is that this
> does work correctly in R-patched, even for old compilers such as gcc3's g77.
>  But it is not portable and not really supported.
>
> So either try a current version of R-patched or write legal Fortran 77.
>
>
>
> On Fri, 23 May 2008, what's in the name? wrote:
>
>  Can anyone help me resolve this? A part of the R function looks like this:
>>
>>      print(is.loaded('merge_xtabs_patterns_file'))
>>      print(is.loaded('merge_xtabs_patterns_file_'))
>>
>>
>> .Fortran('merge_xtabs_patterns_file_',ydim[1],ydim[2],x=as.integer(as.matrix(y)),na=as.integer(c),
>>
>> maxD=as.integer(maxD),lrowmem=length(rowmem),rowmem=as.integer(rowmem),
>>
>> sequential=as.integer(Sequential),nclust=as.integer(nclust))
>>
>>
>>
>>
>> The corresponding output:
>>
>> [1] FALSE
>> [1] TRUE
>> Error in .Fortran("merge_xtabs_patterns_file_", ydim[1], ydim[2], x =
>> as.integer(as.matrix(y)),  :
>>  Fortran symbol name "merge_xtabs_patterns_file_" not in load table
>>
>>
>>
>>
>>
>> Why is it that I get a TRUE for is.loaded with the same symbol, but when
>> using that under .Fortran I get the above error?
>>
>>
>> I also tried replacing the third line with the following (removing the
>> last
>> underscore from the symbol name):
>>
>>
>> .Fortran('merge_xtabs_patterns_file',ydim[1],ydim[2],x=as.integer(as.matrix(y)),na=as.integer(c),
>>
>> maxD=as.integer(maxD),lrowmem=length(rowmem),rowmem=as.integer(rowmem),
>>
>> sequential=as.integer(Sequential),nclust=as.integer(nclust))
>>
>>
>> The corresponding error:
>>
>> Error in .Fortran("merge_xtabs_patterns_file", ydim[1], ydim[2], x =
>> as.integer(as.matrix(y)),  :
>>  Fortran symbol name "merge_xtabs_patterns_file" not in load table
>>
>>
>>
>> Can anyone help?
>>
>> Thanks,
>> A
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
> --
> Brian D. Ripley,                  [EMAIL PROTECTED]
> Professor of Applied Statistics,  
> http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/>
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to