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"
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
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
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
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
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
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