search for: myslot

Displaying 12 results from an estimated 12 matches for "myslot".

Did you mean: myplot
2007 Jun 04
2
locked environment and inheritance
Hi, I have a S3 package with namespace called "myS3Pkg". Inside my package I would like to create a S4 class which extends (adds 2 slots) another S4 class from some other package. The class should be created in "myPkg" environment (and not global environment). Using: setClass("myS4class", representation("otherS4class", mydata = "numeric"),
2006 Sep 26
3
standardization of slot access
Hi, I'm usually confused about when to use 'slot' or '@'. I've frequently read that it's always preferable to use accessor functions, so I would think the '@' operator should be avoided. However, ?slot contains the following advise: "Generally, the only reason to use the functional form rather than the simpler operator is _because_ the slot name has to
2002 Jul 19
1
Rprof and setMethod conflict?
...First, I "test out" Rprof. > require(methods) Loading required package: methods [1] TRUE > > Rprof("test.out") > data.frame("a") X.a. 1 a > Rprof(NULL) So far, so good. Next, I define myClass. > setClass("myClass", representation(mySlot = "numeric")) [1] "myClass" > setMethod("as.data.frame", signature(x = "myClass"), + function(x, row.names, optional) { "as.data.frame for myClass" }) Creating a new generic function for "as.data.frame" on element 1 of the se...
2002 Aug 06
2
[ and setMethod conflict?
...t's test out testIt. > testIt(10) iteration 1 ... iteration 2 ... iteration 3 ... iteration 4 ... iteration 5 ... iteration 6 ... iteration 7 ... iteration 8 ... iteration 9 ... iteration 10 ... So far, no problems. Next, I define myClass. > setClass("myClass", representation(mySlot = "numeric")) [1] "myClass" > setMethod("[", signature(x = "myClass"), + function(x, i, j, drop) "[ for myClass") [1] "[" Again, everything is fine. I've expanded [ to handle objects of class myClass. But when we attempt...
2002 Aug 06
2
[ and setMethod conflict?
...t's test out testIt. > testIt(10) iteration 1 ... iteration 2 ... iteration 3 ... iteration 4 ... iteration 5 ... iteration 6 ... iteration 7 ... iteration 8 ... iteration 9 ... iteration 10 ... So far, no problems. Next, I define myClass. > setClass("myClass", representation(mySlot = "numeric")) [1] "myClass" > setMethod("[", signature(x = "myClass"), + function(x, i, j, drop) "[ for myClass") [1] "[" Again, everything is fine. I've expanded [ to handle objects of class myClass. But when we attempt...
2004 Jan 29
2
Object validation and formal classes
...lidObject(x) where x is of class "myclass", of course. According to the reference docs, I would expect that validation always takes place implicitly when I manipulate an object of "myclass". This especially includes implicit validation if I change slots directly, i.e. x at myslot <- 1:50 should call my validation function. Unfortunately, it isn't called and instead of raising an error and leaving the object unchanged in case validation fails, the object is always changed no matter what I assign to the slot. I'm not sure if I'm missing something here or if...
2002 Aug 26
1
Rprof and setMethod conflict (PR#1949)
...First, I "test out" Rprof. > require(methods) Loading required package: methods [1] TRUE > > Rprof("test.out") > data.frame("a") X.a. 1 a > Rprof(NULL) So far, so good. Next, I define myClass. > setClass("myClass", representation(mySlot = "numeric")) [1] "myClass" > setMethod("as.data.frame", signature(x = "myClass"), + function(x, row.names, optional) { "as.data.frame for myClass" }) Creating a new generic function for "as.data.frame" on element 1 of the se...
2002 Aug 07
0
FW: [R] [ and setMethod conflict?
...eration 2 ... > iteration 3 ... > iteration 4 ... > iteration 5 ... > iteration 6 ... > iteration 7 ... > iteration 8 ... > iteration 9 ... > iteration 10 ... > > So far, no problems. Next, I define myClass. > > > setClass("myClass", representation(mySlot = "numeric")) > [1] "myClass" > > setMethod("[", signature(x = "myClass"), > + function(x, i, j, drop) "[ for myClass") > [1] "[" > > Again, everything is fine. I've expanded [ to handle objects of class...
2004 May 27
3
"privileged slots"
Hi all, in the help for RClassUtils I found the expression "privileged slots" in function "checkSlotAssignment" with the explanation: /privileged slots (those that can only be set by accesor functions defined along with the class itself)/ I thought all slots of a (not private) class can be a accessed by a user via the @ Operator. Is there a way to make a single slot of a
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...tatus - Error : invalid input [%x]\n", - value); + pr_err("set_attention_status - Error : invalid input [%x]\n", + value); break; } if (rc == 0) { @@ -287,8 +289,8 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value) struct slot myslot; debug("get_attention_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", - (ulong) hotplug_slot, (ulong) value); - + (ulong) hotplug_slot, (ulong) value); + ibmphp_lock_operations(); if (hotplug_slot) { pslot = hotplug_slot->private; @@ -318,7 +320,7 @@ stati...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...tatus - Error : invalid input [%x]\n", - value); + pr_err("set_attention_status - Error : invalid input [%x]\n", + value); break; } if (rc == 0) { @@ -287,8 +289,8 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value) struct slot myslot; debug("get_attention_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", - (ulong) hotplug_slot, (ulong) value); - + (ulong) hotplug_slot, (ulong) value); + ibmphp_lock_operations(); if (hotplug_slot) { pslot = hotplug_slot->private; @@ -318,7 +320,7 @@ stati...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...tatus - Error : invalid input [%x]\n", - value); + pr_err("set_attention_status - Error : invalid input [%x]\n", + value); break; } if (rc == 0) { @@ -287,8 +289,8 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value) struct slot myslot; debug("get_attention_status - Entry hotplug_slot[%lx] pvalue[%lx]\n", - (ulong) hotplug_slot, (ulong) value); - + (ulong) hotplug_slot, (ulong) value); + ibmphp_lock_operations(); if (hotplug_slot) { pslot = hotplug_slot->private; @@ -318,7 +320,7 @@ stati...