Re: [Rd] Writing R-extensions

2005-09-04 Thread Berwin A Turlach
G'day Luke, > "LT" == Luke Tierney <[EMAIL PROTECTED]> writes: >> On Sat, 27 Aug 2005, Berwin A Turlach wrote: >>> 3) The final sentence in the section on `Registering S3 >>> methods' is: >>> >>> Any methods for a generic defined in a package that does not >>> use a

Re: [Rd] Writing R-extensions

2005-09-04 Thread Luke Tierney
On Sat, 27 Aug 2005, Prof Brian Ripley wrote: > On Sat, 27 Aug 2005, Berwin A Turlach wrote: ... >> 3) The final sentence in the section on `Registering S3 methods' is: >> >>Any methods for a generic defined in a package that does not >>use a name space should be exported, and

Re: [Rd] A memory management question

2005-09-04 Thread Luke Tierney
On Sun, 4 Sep 2005, [EMAIL PROTECTED] wrote: > Can someone explain the use of SETLENGTH() and SETTRUELENGTH()? > > I would like to allocate a vector and reserve some space at the end, > so that it appears shorter than the allocated size. So that I can > more efficiently append to the vector, wit

Re: [Rd] .Call and Segmentation Fault

2005-09-04 Thread Ricardo Luiz Andrade Abrantes
I think I did. But if I don't, (1) my OS is Linux (Debian) kernel 2.6.8, R version 2.1.1. (2) I generate the shared lib with a cutom makefile: FC = g77 CC = gcc RC = R CMD SHLIB CFLAGS = -Df2cFortran -I/usr/local/lib/R/include -I/usr/local/include -g3 -shared -fPIC FFLAGS = -g3 -shared -fPIC al

[Rd] .Call with C and Fortran together (PR#8122)

2005-09-04 Thread rabrantes82
Full_Name: Ricardo Luiz de Andrade Abrantes Version: 2.1.1 OS: Debian Linux, kernel 2.6.8 Submission from: (NULL) (201.6.83.153) The problem can be well explained with the following example: Suppose I made a program in fortran, and a C interfacece to it. Now I want to use this C interface in R to

Re: [Rd] .Call and Segmentation Fault

2005-09-04 Thread Peter Dalgaard
Ricardo Luiz Andrade Abrantes <[EMAIL PROTECTED]> writes: > Hello there! > I almost don't deal with SEXPs. The function's name is main() it returns a > SEXP wich is R_NilValue, thats all I use of SEXPs. This function call an > optimization packge and the output goes all to a text file. > Well, I

Re: [Rd] .Call and Segmentation Fault

2005-09-04 Thread Ricardo Luiz Andrade Abrantes
Hello there! I almost don't deal with SEXPs. The function's name is main() it returns a SEXP wich is R_NilValue, thats all I use of SEXPs. This function call an optimization packge and the output goes all to a text file. Well, I followed Mr. Lumley's hint and used gdb with R and my program. Toge