G'day Krishna,

On Wed, 12 Mar 2008 08:59:30 -0700 (PDT)
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> > output<-.C("smooth_",as.integer(NROW),as.integer(NCOL),as.integer(NDIM),as.real(X),as.real(W),as.real(A),as.real(B),as.integer(NCYCLE),as.integer(ICYCLE),as.real(G),as.real(EPS),as.integer(IFAULT))

1) You are calling FORTRAN code and not C code, so why are you using .C
instead of .Fortran?

2) Why do you append an underscore to the name of the routine that you
are using? 

3) According to the FORTRAN source, the variables are defined as
REALs, not as DOUBLE PRECISION.  R, by default expects to interface to
DOUBLE PRECISION.  If you want to interface to REALs, you have to use
as.single or set the storage mode to single.

Details regarding all these points are in the "Writing R Extensions"
manual which I would strongly recommend you to study.

Cheers,

        Berwin 

=========================== Full address =============================
Berwin A Turlach                            Tel.: +65 6516 4416 (secr)
Dept of Statistics and Applied Probability        +65 6516 6650 (self)
Faculty of Science                          FAX : +65 6872 3919       
National University of Singapore     
6 Science Drive 2, Blk S16, Level 7          e-mail: [EMAIL PROTECTED]
Singapore 117546                    http://www.stat.nus.edu.sg/~statba

______________________________________________
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