[R] Problem with C extension

Markus Schmidberger schmidb at ibe.med.uni-muenchen.de
Fri Jan 19 15:02:31 CET 2007


Hello,

I try to write an extension in C, to get a faster functions.
Therefore I have to add an element (vector) to a vector. The command in 
R is very simple: x = c(x,a)
But in C I have the problem to reallocate my vector for getting more 
space. Everything I tried, I get a "Segmentation fault".

So, how can I combine two vectors in C and give the result back to R 
(return(x))?

Thanks
Markus Schmidberger

-- 
Dipl.-Tech. Math. Markus Schmidberger

Ludwig-Maximilians-Universität München
IBE - Institut für medizinische Informationsverarbeitung,
Biometrie und Epidemiologie
Marchioninistr. 15, D-81377 Muenchen
URL: http://ibe.web.med.uni-muenchen.de 
Mail: Markus.Schmidberger [at] ibe.med.uni-muenchen.de
Tel: +49 (089) 7095 - 4599



More information about the R-help mailing list