similar to: setMethod("Summary")

Displaying 20 results from an estimated 7000 matches similar to: "setMethod("Summary")"

2006 Aug 30
1
setMethod() and log()
Hi I am having difficulty with setMethod(). I have a "brob" class of objects whose representation has two slots: "x" and "positive". Slot "x" (double) holds the log of a number and slot "positive" (logical) its sign. The idea is that large numbers can be handled. I'm trying to implement a log() method using an analogue of the
2006 Sep 15
1
setMethod() woes
Hello everybody R version 2.4.0 alpha (2006-09-15 r39323), MacOSX 10.4.7 Next S4 problem. I have "brob" objects that are large real numbers, and now I want "glub" numbers that are to be a pair of glubs that represent complex numbers. I want to define binary operator "+" so that if either the left or right argument are glubs, it uses .ArithGlub. If either
2006 Sep 01
1
setMethod("Logic", ...)
Hi In V&R the "polynomial" class is explicitly specified to have no logical operators: setMethod("Logic", signature(e1="polynomial"), function(e1,e2){stop ("...")}) I too have a class of objects for which I want to specify that Logic operators do not work, but executing setClass("brob", representation = representation
2006 Oct 31
1
setReplaceMethod
Hi If x <- 1:10 then x[5] <- 1i will promote x to be a complex vector. Suppose I have an S4 class "brob", and have functions is.brob(), as.brob(), as.numeric() and so forth (minimal self-contained code below). If x is numeric (1:10, say) and y is a brob, what is the best way to make x[5] <- y promote x to a brob in the same way as the complex example? Or is
2008 May 28
1
indexing lists, using brobdingnagian
Dear R-Gurus, I have ended up with a calculation problem where I need to use brobs. I have to work my way through a vector with a for loop to act on each element in a calculation (refering to the previous value in the new vector of results -- so as far as I know I can't use "apply") -- this produces a list of brobs. My problem is, how do I act on, plot this list, or do vector
2006 Sep 12
1
package.skeleton() in R-2.4.1
Hi R version 2.4.0 alpha (2006-09-06 r39158) MacOSX 10.4.7 There was a thread some time ago as to whether the structure created by package.skeleton() would pass R CMD check. I have an example where package.skeleton() gives an R file that gives an error when sourced. If I type setClass("brob", representation = representation
2007 Aug 30
7
Behaviour of very large numbers
Dear all, I am struggling to understand this. What happens when you raise a negative value to a power and the result is a very large number? B [1] 47.73092 > -51^B [1] -3.190824e+81 # seems fine # now this: > x <- seq(-51,-49,length=100) > x^B [1] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN <snip> > is.numeric(x^B) [1] TRUE > is.real(x^B) [1]
2010 Oct 08
2
Error message in as.brob Usage
I am getting the following error message while using the as.brob function in some computations: Error in out.x[ss] <- pmax(x1[ss], x2[ss]) + log1p(+exp(-abs(x1[ss] - : NAs are not allowed in subscripted assignments Is there any obvious mistake I am making here that can resolve the above error message? Thanks for your help. Chow -- View this message in context:
2004 Dec 17
6
take precisely one named argument
Hi I want a function that takes precisely one named argument and no unnamed arguments. The named argument must be one of "a" or "b". If "a" is supplied, return "a". If "b" is supplied, return 2*b. That is, the desired behaviour is: R> f(a=4) #return 4 R> f(b=33) #return 66 R> f(5) #error R> f(a=3,b=5) #error R>
2007 Nov 21
1
equivalent of Matlab robustfit?
Hi, I've been using the Matlab robustfit function for linear regressions where I suspect some data points are outliers. Is there an equivalent function in R? Take care, Darren PS, This is the Matlab help on robustfit: >> help robustfit ROBUSTFIT Robust linear regression B = ROBUSTFIT(X,Y) returns the vector B of regression coefficients, obtained by performing robust
2006 Mar 14
1
setMethod confusion
Hello I've checked through previous postings but don't see a fully equivalent problem-just a few hints. I have been trying to set a new method for the existing function "table" or "as.data.frame.table" for my class "tfSites". Taking out all the useful code and just returning the input class I get the error setMethod("table",
2007 Jan 12
0
Dummy's guide to S4 methods: package Brobdingnag
Hello List. please find uploaded to CRAN a new package, Brobdingnag. This package does two things: (1) allows computation of very large numbers using a logarithmic representation. (2) provides a "Hello, World" example of S4 methods in use: there are two classes of object (brob and glub) and one virtual class (swift). The package includes a vignette that is a
2006 Mar 15
1
setMethod confusion -best reference for S4 programming
Thanks I think you have both answered my question (reckon Ill go S3 on that). As an adjunct to this do you know what might be the best reference to the S4 methods current implementation. I have ordered the Chambers book "Programming with Data", and I have a short tutorial-- "S4 Classes in 15 pages, more or less". Have I missed any other useful resources? Stephen Henderson
2008 May 21
2
\S4method in combination with "[" and "[<-"
Dear developers, We want to use "\S4method" to document new S4-methods for "[" and "[<-". We use this for other functions/methods and it works without any problem, but in case of "[" and "[<-" we didn't manage to bring this to work. The problem occurs in the development version of our package "distrSim" which can be found
2004 Jun 26
1
S4 group "Math", "getGroupMembers", "genericForPrimitive"
Hi, I found the following on Windows 2000/NT R Version 1.9.1 (2004-06-21) (also Version 1.9.0): The S4 group "Math" doesn't work as documented; i.e., "log", "log10", "gamma" and "lgamma" are included in the documentation but don't work. See example code below. Moreover, what about 'genericForPrimitive' which is used in
2010 Oct 26
1
S4 methods for rbind()
Hello. I am trying to write an S4 method for rbind(). I have a class of objects called 'mdm', and I want to be able to rbind() them to one another. I do not want the method for rbind() to coerce anything to an mdm object. I want rbind(x1,x2,x1,x2) to work as expected [ie rbind() should take any number of arguments]. This is what I have so far: setGeneric(".rbind_pair",
2005 Oct 27
9
Overloaded samba server. Is it a bug?
Experts, We've just migrated from samba 2.2.8a to samba 3.0.20b in a very large corporate environment. Everything was really fine in our lab, but we began experiment serious load problems on the productive servers the morning after the procedure took place. I'll try (briefly) to describe the characteristics of the scenario: Resources: Old Environment: Hardware:
2014 Aug 13
2
[LLVMdev] Functions with unnamed parameters in LLVM IR
Hi, Recently I came across some IR produced by a frontend that had unnamed function arguments. For example something like this. ``` define i32 @foo(i32, i32, i32) #0 { %x = add i32 %1, %2 ret i32 %x } ``` I had never seen this before, so I took a look at the LLVM language reference manual and the section on functions [1] doesn't say anything about what "argument list" can be
2014 Nov 16
2
Problem with Xen4CentOS
Hi folks, we (the company i am working for) are running several dozens of virtualisation servers using CentOS 6 + Xen4CentOS as the virtualisation infrastructure. With the latest versions of all packages installed [1], we see failures in live-migration of stock-CentOS6 HVM guests, leaving a "Domain-unnamed" on the source host, while the migrated guest runs fine on the target host.
2013 Apr 09
2
[LLVMdev] get the identifies of the unnamed temporaries from the instruction of LLVM IR
hello guys: I am in trouble with get the identifies of the unnamed temporaries from the instruction of LLVM IR. for example: instruction: %4 = mul nsw i32 %1, %width unnamed temporaries: %4, %1 how to get them? I have tried several iterators(op_iterator,value_op_iterator) and getOperand(int) function,but none of them works. does anyone know how to get it? thanks very much -- View this message