search for: fparlami

Displaying 16 results from an estimated 16 matches for "fparlami".

Did you mean: fparlamis
2006 Sep 27
1
potential setClass bug (with user-defined environment)
the following returns an error in an 'exists' call on my machine MyEnv <- new.env() setClass("Numeric", "numeric", where=MyEnv) franklin parlamis > version _ platform powerpc-apple-darwin8.7.0 arch powerpc os darwin8.7.0 system powerpc, darwin8.7.0 status beta major 2 minor 4.0 year
2005 Nov 23
3
date/time arithmetic
On the help page "DateTimeClasses {base}" it says: "One can add or subtract a number of seconds or a difftime object from a date-time object, but not add two date-time objects." However, > x<-Sys.time(); y<-Sys.time()+3600 > diff<-y-x > x; y; diff [1] "2005-11-23 19:58:20 GMT" [1] "2005-11-23 20:58:20 GMT" Time difference of 1 hours
2005 Dec 29
1
trouble with S4 methods for group "Summary"
Hello. This question concerns the Methods package. I have created a new class and am trying to set a method for it for S4 group generic "Summary". I have run into some signature problems. An example: > setClass("track", representation(x="numeric", y="character")) [1] "track" > setGeneric("max", group="Summary")
2006 Apr 06
0
algebra
hello all. i have been trying to develop a representation (in the S4 sense) for a floating cash object, which would store a cash amount as a function of an arbitrary number of variables (with unknown values). for example, an interest rate swap may call for a payment in one year that can be represented as a function of a 3-month libor rate to be determined in nine months. this floating cash
2005 Oct 12
1
bug checking
I have observed the following behavior, wondering if it is a bug before I submit a report. I am using the plot function with call: plot(X, Y, col="red", . . . ) where X is an object that inherits from classes 'dates' and 'times' (created with the 'dates' function from package 'chron') and y is a numeric vector. The color red is applied to the
2006 May 02
0
methods for @ operator
i often find myself having a list of similarly-classed S4 objects and needing a list containing a particular extracted slot from those objects. so i did the following: > setMethod("slot", signature(object = "list"), + function(object, name) + lapply(object, function(i) slot(i, name))) Creating a new generic function for 'slot' in '.GlobalEnv' [1]
2006 May 11
1
@ accesses attributes, not just formal slots ?
Using the '@' operator, I am able to extract a 'names' attribute assigned to a formal object. However, I can not use the replacement form ('@<-') to assign that attribute. > setClass("foo", representation("numeric")) [1] "foo" > (new("foo", 1:4)->a) An object of class ?foo? [1] 1 2 3 4 > names(a) <-
2006 Sep 21
1
validity testing as part of '@<-'
'methods' package feature request / discussion starter: perhaps a call to 'validObject' should occur at part of any slot replacement operation (and the operation not be carried out if it would invalidate the object)? this may prevent the need for prophylactic 'validObject' calls in other user-defined functions. in the example below, the slot assignment occurs
2006 Oct 06
1
class unions?
the code below has me confused: setClassUnion("index", c("numeric", "character", "logical")) extends("numeric") # i don't see the class union library(Matrix) extends("numeric") # now i see the class union i am aware that the "Matrix" package separately defines the "index" class union. is it the case that
2007 Aug 17
0
Hedge Fund Job Opening
Hi all. I've been lurking and posting on this list for a few years now. Prior to that, I managed the US Convertible Arbitrage portfolio for Amaranth Advisors. I recently agreed to manage a similar portfolio for a different hedge fund and am looking for someone to join me, essentially as the principal quant for a new San Francisco office. I've been very impressed with the posters on
2006 Sep 20
1
residual '*tmp*' variable after "[<-" error
self-sanity check prior to filing a bug report: attempted replacement that generates an error leaves a '*tmp*' variable in the global environment. test <- 1:10 test[2:4] <- expression(e) ls() i've read section 3.4.4 of the "R Language Definition" which discusses the mechanism for replacement, and it is not clear to me whether this was intended, but i suspect
2006 Sep 23
1
generics for primitive functions
i think these two code snippets exhibit a bug. they are identical but for the inclusion of an initial line in snippet [2] [1] setMethod("Math", signature(x = "numeric"), function(x) "Works") getGeneric("sqrt")(4) [2] getGeneric("sqrt")(4) setMethod("Math", signature(x = "numeric"), function(x) "Works")
2006 Oct 20
1
understanding virtual classes and extensions thereof
I am having some trouble creating a hierarchy of virtual classes (akin to the class structure in the 'Matrix' package). I think they arise from my not understanding the best way to specify virtual subclasses of a virtual class. please see questions below code. setClass("mom") setClass("kid1", representation("mom", "VIRTUAL"))
2006 Oct 11
1
dispatching on group generics with more than one formal
please see the code below. foo2 fails to dispatch correctly, but foo does fine. i have tried 'cacheMetaData(1)' and a number of different variants of 'cacheGenericsMetaData', on the possibility there is a caching issue. but i still can't sort it out. also one general question: does it really matter what's in the body of the function definition in a
2006 Sep 14
1
attributes of S4 objects
I am having a bit of a struggle deciding when to use attributes with S4 objects. Clearly the 'class' attribute will always be present. But it is not clear to me whether the architects of the methods package intend that other attributes, such as 'names', will still be used when the S4 implementation is complete. I notice that, when you create a formal object from an
2006 Oct 19
1
default arguments in generics and methods
i believe the following is true but would appreciate confirmation that it is intended behavior and will continue: if a default argument is employed in the definition of a generic function, and the generic is called with the argument in question (call it 'ARG') missing, then the method for signature (..., ARG = "missing", ...) will be called by 'standardGeneric'