similar to: Seeking help to define method for show() for an S4 object

Displaying 20 results from an estimated 5000 matches similar to: "Seeking help to define method for show() for an S4 object"

2011 Feb 01
1
Help need to define method of an s4 class
I need some help in defining a "print" method for my new S4 class definition. So fer I have worked like this: setClass("MyClass", sealed=F, representation(slot1 = "list", #create a new class slot2 = "vector", slot3 = "vector", slot4 = "vector")) setMethod("print",
2011 Mar 06
1
Seeking guidance in package creation when it contains s4 class
Dear all, I am having problem to create a package when this package is supposed to have some newly created s4 class. Here is my workout: > #rm(list = ls()) > setClass("aClass", sealed=T, representation(slot1 = "vector", slot2 = "character")) [1] "aClass" > fn1 <- function(x, y, z) { + x <- x[1] + y <- y[1] + z <- as.character(z[1]) +
2015 May 12
2
Unexpected failure when calling new() with unnamed arg and
Hi, The man page for new() suggests that if 'a' is an object with slots "slot1" and "slot2" and C is a class that extends the class of 'a', then the 2 following calls should be equivalent: new("C", a, ...) new("C", slot1=a at slot1, slot2=a at slot2, ...) This is generally the case but I just ran into a situation where it's not.
2015 May 13
2
Unexpected failure when calling new() with unnamed arg and
Thanks Martin for looking into this. H. On 05/13/2015 03:57 AM, Martin Maechler wrote: >>>>>> Herv? Pag?s <hpages at fredhutch.org> >>>>>> on Tue, 12 May 2015 15:18:42 -0700 writes: > >> Hi, > >> The man page for new() suggests that if 'a' is an object with slots >> "slot1" and "slot2" and C is a
2015 Oct 08
1
Unexpected failure when calling new() with unnamed arg and
>>>>> Joshua Wiley <jwiley.psych at gmail.com> >>>>> on Thu, 8 Oct 2015 12:19:16 +1100 writes: > Hi, I realize this is an old thread, but just wondering > whether a conclusion was ever reached on this issue? I'm > using formula(NULL) but it would be nice if default > initialization worked for formula classes as well. Well,
2009 Jan 02
1
"registering" a generic method for a class
Sorry in advance if this is too simple a question, but I'm stuck with some odd behavior and I can't find the text to rid myself of this (admittedly somewhat trivial) problem. Note that I've done generic programming with S3 "objects" in the past, but I've never really dabbled in creating S4 objects until now. So, I've created a new S4 class, call it
2004 Sep 28
1
ZT_CHANCONFIG failed on channel 1
I get this error no matter what I do. I've tried switching to different locations on the TDM400p to no avail. I've got the card setup with the green module in slot1 and red in slot2. My config files are exactly like the "Configure Dev-Kit PCI (TDM11B)" example. http://www.digium.com/index.php?menu=configuration#TDM11B When I run ztcfg -v, I get: 2 channels configured.
2015 May 13
0
Unexpected failure when calling new() with unnamed arg and
>>>>> Herv? Pag?s <hpages at fredhutch.org> >>>>> on Tue, 12 May 2015 15:18:42 -0700 writes: > Hi, > The man page for new() suggests that if 'a' is an object with slots > "slot1" and "slot2" and C is a class that extends the class of 'a', > then the 2 following calls should be equivalent: >
2015 Oct 08
0
Unexpected failure when calling new() with unnamed arg and
Hi, I realize this is an old thread, but just wondering whether a conclusion was ever reached on this issue? I'm using formula(NULL) but it would be nice if default initialization worked for formula classes as well. Cheers, Josh On Thu, May 14, 2015 at 8:13 AM, Herv? Pag?s <hpages at fredhutch.org> wrote: > Thanks Martin for looking into this. H. > > > On 05/13/2015
2015 Nov 23
3
Hexagon and choosing of slots
I'm curious how does hexagon hardware decide which slot to use for a given instruction? Is there special hardware to make that decision? I'm asking because I didn't see any information about which slot to use for a given packet. Is it even possible to pass this kind of information through assembly? Say hardware sees a packet and the packet tells it which slot to use. I would greatly
2011 Feb 07
1
Seeking help to define s4 method for 'print'
I have got another question on defining a method for print() function for my s4 class. Here is my class definition as well as what I have done till now: > setClass("Me", representation(x1 = "numeric", x2 = "numeric", y1 = "character")) [1] "Me" > setMethod("print", "Me", definition=function(x) { + cat("Values
2005 Jan 15
0
ADSI unlock codes
Program your locked ADSI phone not by unlocking it but by using the feature slot FDN download descriptors of ADSI SEC security code telco provider lock number key from database list. ch33s3 First reset phone. Set clock to Jan 1 12:00AM (options-2?). exit to main screen. press options, (mute/flash/speaker/?) until you see firmware version. press # to reset. google more info, bam ch33s3d ;
2005 Nov 09
1
smarter sparse files?
Question: Does ext2/3 (or any other filesystem you know of) support a system call turning blocks within a file back into "sparse zeros", i.e. giving the blocks back to the filesystem? Background: I am working on a slotted fileformat where internal fragmentation occurs. One such occurrence is growth of the data in a given slot, which currently requires me to handle the
2007 Mar 30
2
Replacing slot of S4 class in method of S4 class?
Dear all, Assume that I have an S4 class "MyClass" with a slot "myname", which is initialized to: myname="" in method("initialize"): myclass <- new("MyClass", myname="") Assume that class "MyClass" has a method "mymethod": "mymethod.MyClass" <- function(object, myname=character(0), ...) {
2015 Nov 24
2
Hexagon and choosing of slots
> On Hexagon, the slot assignment is determined by the layout of the > instructions in memory. The order of the instructions in the packet does > not matter either in the IR, nor in the .s file, but it does when the > packet is encoded into the actual machine code. In LLVM, the Hexagon > shuffler orders the instructions just prior to encoding. > > Specifically, the
2011 Feb 05
1
Seeking help to define method for '+'
Dear all, I am trying to define "+" method for my newly defined s4 class which is as follows: setClass("Me", sealed=F,representation(x1 = "numeric", x2 = "character")) new1 <- new("Me", x1=2, x2="comment1") new2 <- new("Me", x1=3, x2="comment1") setMethod("+", "Me",
2008 Dec 22
1
How to add a slot to S4 class of an existing package?
Dear all, Since my package is based on S4 classes, I would like to know how to add a slot to an existing S4 class without breaking the code of users of my package. Assume the following S4 class: setClass("MyClass", representation(name = "character", type = "character", data = "data.frame" ), prototype(name =
2014 Jan 07
1
Why do methods of "initialize" have no "srcref" attribute as other S4 mehtods?
For documentation we use a system that generates Rd files from special comments in the code. (inlinedocs). It is crucial to be able to get the defining source code for objects like methods to extract the comments from it. Here is an R session that shows how this works for several kinds of methods and (at the end of the session) how if fails for methods of "initialize" >
2017 Sep 22
2
S4 method implementation for S3 class
Hi all, I'm trying to implement the matrix multiplication operator, which is S4 generic, for an old-style S3 class. The following works as expected: x <- 1:10 class(x) <- "myClass" setOldClass("myClass") setGeneric("myMethod", function(x, y) standardGeneric("myMethod")) setMethod("myMethod", c("myClass", "myClass"),
2009 May 18
1
S4 method dispatch and namespaces: why is default method selected
Hi, I ran into the following peculiarity involving S4 method dispatch and namespaces. I develop a package which have a namespace and which depends on 'pixmap' package, which itself does not have a namespace. Now, in my package I have a class which has a slot for objects from class "pixmap" and I want to have a "plot" method for this new class. Not to clutter the