Re: [Rd] Bug or feature: using "ANY" as a generic field class (was: '[R] Is there a (virtual) class that all R objects inherit from?)

2011-06-03 Thread John Chambers
Well, your mail is unclear as to what you expected, but there is one bug shown by your example. The behavior of S4 classes is sensible, at least as far as the example shows: > setClass("A", representation(x="ANY")) [1] "A" > setClass("B", contains="A", representation(x="character")) [1] "B"

Re: [Rd] C-Side: Applying a function (given as param) to data (given as param)

2011-06-03 Thread Douglas Bates
On Fri, Jun 3, 2011 at 5:17 AM, oliver wrote: > Hello, > > I'm implementing a package (C-extension), > where one function gets data and a function > that needs to be applied to the data. > > I want to apply the function to (parts of) > the data on the C-side. > > 1) how do I apply a function (give

Re: [Rd] Problem to execute a function loading by my package that I created

2011-06-03 Thread Po
Thank you for your help Simon. I resolved my issue. As you told me, I put my C++ program in a separate directory of my package. I create a library with my C++ program. On my package, there are only functions called by R and that uses my program. From: Simon Urbanek [via R] [mailto:ml-node+3570

Re: [Rd] Problem to execute a function loading by my package that I created

2011-06-03 Thread Simon Urbanek
Pauline, since you mentioned Rcpp, you're on the wrong list. I have put some comments below but they assume you're using regular R packaging and not Rcpp. On Jun 3, 2011, at 4:41 AM, Po wrote: > I still look for my problem. > I think that maybe my Makefile is not good. > > In my folder src of

[Rd] Bug or feature: using "ANY" as a generic field class (was: '[R] Is there a (virtual) class that all R objects inherit from?)

2011-06-03 Thread Janko Thyson
Dear list, I was wondering if you could help me out in clarifying something: Is it possible to use class "ANY" in slots/fields of formal classes if you a) do not want to restrict valid classes of that field and b) if you are making explicit use of class inheritance? It seems to work in simp

Re: [Rd] Problem to execute a function loading by my package that I created

2011-06-03 Thread Po
I still look for my problem. I think that maybe my Makefile is not good. In my folder src of my package, I put an existing program. In this program, I had already a makefile. So I kept this makefile and I changed. I saw that it's better to have a file Makevars to compile. But I don't know what is

[Rd] C-Side: Applying a function (given as param) to data (given as param)

2011-06-03 Thread oliver
Hello, I'm implementing a package (C-extension), where one function gets data and a function that needs to be applied to the data. I want to apply the function to (parts of) the data on the C-side. 1) how do I apply a function (given via SEXP) to data 2) how do I select parts of the data (also p