Re: [Rd] Problem with initialize of S4 classes

2007-12-23 Thread Martin Morgan
Hi Christian -- Does your package have a name space, but not export 'initialize'? Calling 'new' will then go directly to the default constructors, generating the error. A different solution would be to define a constructor in your package PreFilter <- function(...) { new("PreFilter", ...) }

Re: [Rd] re quest for addition to R-int

2007-12-23 Thread Ben Bolker
Bjørn-Helge Mevik wrote: > > Ben Bolker wrote: > >> http://cran.r-project.org/doc/manuals/R-ints.html#R-coding-standards >> >> gives detailed advice on how to set the indentation level for >> C code to 4, but it took me a bit of poking around in the archives >> to find the >> >> (setq ess-ind

Re: [Rd] Problem with dyn.load'ed code

2007-12-23 Thread Hin-Tak Leung
You are missing some extern "C" declarations? R needs C linkage style. Basically a lot of: extern "C" { } around your c++ code. Matt Calder wrote: > Hi, > I am having trouble with some code that I am dyn.loading. I am > writing an interface to ARPACK. I compile my interface (dssimp.cc), an

[Rd] Problem with initialize of S4 classes

2007-12-23 Thread cstrato
Dear all Below is the code for "scriptPreFilter.R" which gives the following result: > source("scriptPreFilter.R") > prefltr <- new("PreFilter", mad=c(0.5,0.01)) [1] "--initialize:PreFilter--" [1] "--initialize:Filter--" > str(prefltr) Formal class 'PreFilter' [package ".GlobalE

[Rd] Problem with dyn.load'ed code

2007-12-23 Thread Matt Calder
Hi, I am having trouble with some code that I am dyn.loading. I am writing an interface to ARPACK. I compile my interface (dssimp.cc), and link it against the ARPACK library (libarpack_SUN4.a): g++ -shared -static -fPIC dssimp.cc -o dssimp.so -larpack_SUN4 -lg2c -lm I can dyn.load the code