[Rd] destructor for S4 class objects in analogy to C++

2009-07-21 Thread David Scherrer
Hi all,

I'm wondering if there is a way to define a destructor function (to free
memory) for S4 class objects in analogy to C++?
rm() combined with gc() does not seem to be a good idea (Chambers, 2008).
So could it be done on the C/C++ level or is it even already available in
the "internals"?

Many thanks,
David

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Rcpp and variable protection

2009-08-10 Thread David Scherrer
Hi all,

is there already a variable protection (as use else when linking to C/C++
e.g. PROTECT(a = AS_NUMERIC(a)); ) built in when using RcppExport from Rcpp?

Many thanks,
David

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Error in namespaceExport(ns, exports) :

2009-12-03 Thread David Scherrer
Dear all,

I get the error

"Error in namespaceExport(ns, exports) :
  undefined exports function1 , function2"

when compiling or even when I roxygen my package. The two function I once
had in my package but I deleted them including their .Rd files. I also can't
find them in any other function or help file.

So does anybody know where these functions are still listed that causes this
error?

Many thanks,
David

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] RSPython

2009-02-11 Thread David Scherrer
Hi all,

I try to utilize RSPython to invoke Python from R. For me it works pretty
fine for basic applications, but I have 3 problems that may be related.

(1) I can't load other packages but "standard" ones also when I adjust the
PythonPath:

   > importPythonModule('sys', all=T)
   NULL

   > importPythonModule('numpy', all=T)
   Error in .PythonEval(cmd) :
   Error in Python call:
/usr/lib/python2.5/site-packages/numpy/core/multiarray.so: undefined symbol:
_Py_ZeroStruct

   > importPythonModule('Scientific.Functions.Derivatives', all=T)
   Error in .PythonEval(cmd) :
   Error in Python call:
/usr/lib/python2.5/site-packages/Scientific/linux2/Scientific_numerics_package_id.so:
undefined symbol: PyString_InternFromString


(2) I can't even load the test example provided at www.omegahat.org/*
RSPython*/  .

   >
Sys.putenv("PYTHONPATH"='/usr/local/lib/R/site-library/RSPython/tests')
   > .PythonInit()
   > test <- .PythonNew("RSTest", .module="method")
   Error in .PythonNew("RSTest", .module = "method") : No such module


(3) It doesn't find RS.so if I try dyn.load("RS.so")

My OS is Linux Debian (kernel 2.6.27-11-generic)  .

Many thanks for you help!

David

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] interior point methods, automatic differentiation in R

2009-02-18 Thread David Scherrer
Dear all,

I'm wondering if there are some ongoing projects for interior point methods
in R (e.g. linking ipopt from Coin written in C++ to R) and for automatic
differentiation in R (e.g. linking openAD available in C++ and Fortran) ?

Many thanks,
David

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel