[Rd] performance of vector subscripting via character index

2009-09-07 Thread Jim Regetz
Hi all, Using character indexing on a vector is quite fast up through vector length of 46340, then it suddenly it gets 3 orders of magnitude slower. This is true at least of the special case in which the index vector is the complete (though possibly out-of-order) set of vector names: test <-

[Rd] obstacles to using vectors with attributes

2008-04-15 Thread Jim Regetz
Hi all, I am working on an application in which we'd like to use attributes to attach simple metadata to arbitrary R objects. It is essential that all functions that will work on the original object will also work on the object after metadata attributes have been added. However, this is not al

Re: [Rd] Problems initializing an extended S4 class

2008-03-03 Thread Jim Regetz
tical issues are (1) I may have several variants of the user-level constructors and don't want to repeat the common initialization code in each one, and (2) the operations I have in my initialize methods are only sensible for valid objects (and thus not meaningfully executed before 'n

[Rd] Problems initializing an extended S4 class

2008-02-28 Thread Jim Regetz
Hi all, I am having trouble extending S4 classes in cases where I'm using both validity and initialize methods. I've read as much S4 information as I can find, but I've yet to have that "a-ha" moment. In my application, I am using validity methods to guard against inappropriate input data that