Displaying 20 results from an estimated 7000 matches similar to: "S4 class redefinition"
2011 Jun 23
1
Class not found when search in .onLoad
Hi,
I am facing with a strange behaviour of isClass and extends when these
are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing
my package from doing some object initializations at a proper place
(i.e. in .onLoad).
Suppose one defines two S4 classes in a package, and that one needs to
check the inheritance between these two when loading the package (e.g.
to validate slots
2011 Feb 28
3
[LLVMdev] Extending FunctionType
2011/2/28 John Criswell <criswell at illinois.edu>:
> On 2/28/11 6:31 AM, Gabriel Rodríguez wrote:
>
> Hi all,
>
> I am trying to extend a FunctionType to include new parameters. In
> particular, I want to
> ensure that the main function has been declared with both argsc and argsv.
> However
> there seems to be no easy way to accomplish this:
>
2011 Feb 28
2
[LLVMdev] Extending FunctionType
On Mon, Feb 28, 2011 at 5:10 PM, John Criswell <criswell at illinois.edu> wrote:
> On 2/28/11 10:04 AM, Frits van Bommel wrote:
>> I don't think a full clone is necessary, since he wants to replace the
>> function. He only needs to create the new function and splice in the
>> body of the old one.
>
> That is exactly what MakeFunctionClone() does. It creates a
2011 Feb 28
0
[LLVMdev] Extending FunctionType
On 2/28/11 10:04 AM, Frits van Bommel wrote:
> 2011/2/28 John Criswell<criswell at illinois.edu>:
>> On 2/28/11 6:31 AM, Gabriel Rodríguez wrote:
>>
>> Hi all,
>>
>> I am trying to extend a FunctionType to include new parameters. In
>> particular, I want to
>> ensure that the main function has been declared with both argsc and argsv.
>>
2003 Sep 07
1
Problem Installing Open H.323 Channel Driver
Hi,
I am having trouble installing the Open H.323 Channel driver in Asterisk. I
have installed PWLib and OpenH323 V.1.11.7
This is the output l get before it bails out.
asterisk:/usr/src/asterisk/channels/h323# make
g++ -g -c -o ast_h323.o -march=i686 -DPBYTE_ORDER=PLITTLE_ENDIAN -DNDEBUG
-DDO_CRASH -DDEBUG_THREADS -pipe -Wall -fPIC -Wmissing-prototypes
-Wmissing-declarations -DP_LINUX
2005 Aug 18
2
Use of contains in S4 classes
setClass("B", representation=representation("B", extra="numeric))
setClass("B", representation=representation(extra="numeric"),
contains="B")
Are these the same? If not, how do they differ?
What about
setClass("B", representation=representation("B", extra="numeric"),
contains="B")
?
As far as I can
2011 Feb 28
0
[LLVMdev] Extending FunctionType
On 2/28/11 6:31 AM, Gabriel Rodríguez wrote:
> Hi all,
>
> I am trying to extend a FunctionType to include new parameters. In
> particular, I want to
> ensure that the main function has been declared with both argsc and
> argsv. However
> there seems to be no easy way to accomplish this:
> llvm::Function::getFunctionType() returns a
> a reference to a const object,
2008 Mar 30
1
package.skeleton.S4
Hi the devel list.
I am adapting the package.skeleton to S4 classes and methods
I would have been very proud to post a new working function on this list.
Unfortunately, I do not manage to solve all the problems. Mainly
- sys.source does not compile a file with setClass
- dumpMethod does not exists yet
In the following code, thise two problems are notified by a line
#################
Still
2011 Feb 28
2
[LLVMdev] Extending FunctionType
Hi all,
I am trying to extend a FunctionType to include new parameters. In particular, I want to
ensure that the main function has been declared with both argsc and argsv. However
there seems to be no easy way to accomplish this: llvm::Function::getFunctionType() returns a
a reference to a const object, while modifying only the argument list yields an error during verification
since the
2016 Apr 22
2
S4 non-virtual class with no slots?
It seems that if an S4 class has no slots it can't be instantiated because it is assumed to be virtual. Is there a way around this other than adding a do-nothing slot? A singleton would be OK, though is not essential.
Problem:
EmptyFitResult <- setClass("EmptyFitResult", representation=representation())
# also tried it without the second argument. same result.
> e <-
2006 Nov 24
1
Missing values for S4 slots
Using R 2.4, the following fails:
setClass("testc", representation(a="ANY"))
makeC <- function(myarg) new("testc", a=myarg)
makeC()
-> Error in initialize(value, ...) : argument "myarg" is missing,
with no default
On the other hand, this is OK:
f <- function(a) g(b=a)
g <- function(b) if(missing(b)) "missing" else "valid
2009 Nov 25
1
group generics
I have classes A and B, where B contains A. In the implementation of
the group generic for B I would like to use the corresponding group
generic for A. Is there a way to do that?
I would also appreciate any comments if what I'm trying to do seems like
the wrong approach.
Here's a stripped down example:
setClass("A",
2012 Oct 18
1
S4 fails to initialize linear hierarchies with intermediate VIRTUAL classes
Initialization of this simple hierarchy
A = setClass("A", representation(x="numeric"))
setClass("B", contains=c("VIRTUAL", "A"))
C = setClass("C", contains="B")
fails (neat that setClass returns generators; I hadn't realized that before!)
> C(A())
Error: evaluation nested too deeply: infinite recursion /
2010 Feb 02
1
S4 setClass / initialize misunderstanding
Hi, I recently ran into this problem. I couldn't find any mention of it in
the setClass documentation.
setClass("Foo", representation(file = "character"))
setMethod("initialize", "Foo", function(.Object, file) {
print(file)
})
setClass("Bar", contains = "Foo")
And the error:
Error in print(file) : argument "file" is
2017 Jun 06
2
surprisingly, S4 classes with a "dim" or "dimnames" slot are final (in the Java sense)
Hi,
It's nice to be able to define S4 classes with slots that correspond
to standard attributes:
setClass("A1", slots=c(names="character"))
setClass("A2", slots=c(dim="integer"))
setClass("A3", slots=c(dimnames="list"))
By doing this, one gets a few methods for free:
a1 <- new("A1", names=letters[1:3])
2008 Feb 17
1
NAMESPACEs and S4 classes
I'd like to have two packages with S4 classes with the same name but
different implementation. To that end I create a package tmpA with
setClass("A",
representation=representation(
x="numeric"),
sealed=TRUE)
setClass("B",
representation=representation(
x="numeric"))
B <- function(...)
2011 Jan 28
2
help with S4 objects: trying to use a "link-glm" as a class in an object definition
Hi,
I'm trying to make a new S4 object with a slot for a "link-glm" object. R doesn't like me have a slot of class "link-glm"
> class(make.link("probit"))
[1] "link-glm"
> setClass("a",representation(item="link-glm"))
[1] "a"
Warning message:
undefined slot classes in definition of "a": item(class
2020 Oct 05
2
S4 - inheritance changed by order of setClassUnion and setAs()
Dear colleagues,
there is a behaviour with S4 (virtual) classes that I find very hard to understand: Depending on the position
of setAs(), the tree of inheritance changes.
This is my baseline example that defines the classes "grandma", "mother", "daughter" and a virtual
class "mr_x". For a new instance if "daughter", "mr_x" is betweeen
2017 Jun 06
1
surprisingly, S4 classes with a "dim" or "dimnames" slot are final (in the Java sense)
I've fixed this and will commit soon.
Disregard my dim<-() example; that behaves as expected (the class needs a
dim<-() method).
Michael
On Tue, Jun 6, 2017 at 5:16 AM, Michael Lawrence <michafla at gene.com> wrote:
> Thanks for the report. The issue is that one cannot set special attributes
> like names, dim, dimnames, etc on S4 objects. I was aready working on this
>
2005 Apr 13
1
S4 extends a class, but .Data slot has different class
When I define an S4 class ("B" in the example below) that directly extends
another ("A" in the example below) , which in turn directly extends another
("character" in the example below), I find that the slot does not have the
class I specified in setClass(), it has the underlying class.
Is this an intended feature?
Briefly, the reason for using this type of