search for: vitosmail

Displaying 11 results from an estimated 11 matches for "vitosmail".

2009 Aug 17
2
S4: inheritance of validity methods?
Dear Developers, In current implementation of validity method, objects are first coerced to superclass (slots are striped). Thus, it is not possible to write validity method which would perform some checks on children slots. Say, I want to check if number of slots in a class is equal to "n": setClass("A", representation(a="numeric", n="integer"),
2009 Oct 15
2
forwarded: bug (?) in cut.POSIXt with "breaks"=integer
From: Vitalie S. <vitosmail <at> rambler.ru> Subject: Bug in cut.POSIXt Newsgroups: gmane.comp.lang.r.general Date: 2009-10-15 15:47:48 GMT (1 hour and 29 minutes ago) Hello Everyone, Before reporting decided to post here first: tt <- structure(c(1254238817, 1254238859, 1254238969, 1254239080), class = c("...
2009 Sep 11
1
Modify functions in base packages (needed for completion for proto objects)
Hello everyone, I am trying to implement completion for proto objects. Proto extends environment in a hierarchical way. Thus completion should list all the names in all it's parent environments. For "normal" classes defining names.class would do the job, but completion for "environment" is hard coded in utils:::specialCompletions by means of base::ls(). As result
2009 Aug 28
1
names<- in data.frame (PR#13916)
Full_Name: Spinu Vitalie Version: 2.9.0 OS: Windows Submission from: (NULL) (130.115.113.15) In assignment of "zero length" names to data.frame: > tdf <- data.frame(rbind(c(1, 2), c(1, 2))) > names(tdf) <- c("", "") > tdf structure(c("1", "1"), class = "AsIs") structure(c("2", "2"), class =
2008 Dec 02
4
Bug in "transform"?
Dear useRs, Here is a weird behavior of transform function: mtcars1<-matcars transform(mtcars1,t1=3,t2=4) Error in data.frame(`_data`, e[!matched]) : arguments imply differing number of rows: 32, 1 instead, this works: mtcars1$t1<-0 transform(mtcars1,t1=3,t2=4) also works if applied in turn: transform(mtcars1,t1=3) transform(mtcars1,t2=4) I often need to use this
2009 Jun 05
2
S4: When is validObject issued? (or why S4 is killing me:( ..
Dear UseRs, Does anyone know when exactly the validity is checked in S4? Documentation is silent:(. Here is a small example: setClass("test1",representation(a="numeric")) setMethod("initialize","test1", function(.Object,...){ a<-runif(1) ## here slot "a" is initialized ## callNextMethod(.Object,a=a,...)
2008 Nov 01
1
Splitting device for ggplots?
Dear UseRs, For various reasons I need to plot multiple ggplots on one device (preferably pdf). Is there a way to achieve that? par(mfrow), split.screen() and layout() seem not to do the job. Thanks, Vitalie.
2009 Jun 05
1
S4: Initialization method called during setClass??
Dear UseRs, A simple class inheritance example: > setClass("test",representation(a="numeric")) > setMethod("initialize","test", function(.Object,x,...){ print("Initialization!!!") callNextMethod(.Object,a=x,...) }) > new("test",x=23) [1] "Initialization!!!" An
2009 Jun 15
1
S4: Bug in group method defenition ("Compare")
Dear UseRs, Setting methods for groups ("compare" in this case) does not work properly. Once one method is set ,redefining it or even removing does not change the behavior: setClass("foo" ,representation(range="numeric") ) #[1] "foo" setMethod("Compare",c(e1="ANY",e2="foo"), function(e1,e2){ browser()
2009 Jun 25
1
Make functions aware of theyr own slots.
Hello, Is there a way to access function's slots from inside the function? I want to make functions slot dependent without recurring to generic function mechanism. Probably this goes a bit against R philosophy, but otherwise I don't really see the use of extending functions in R. Would be nice to have something like:
2009 Aug 28
1
S4: names stripped during instantiation of grandchildren of numeric class
Dear All, A small inconsistency (it's probably not even a buglet): > setClass("A", contains="numeric") [1] "A" > names(new("A", c(a=23))) [1] "a" > setClass("B", contains="A") [1] "B" > names(new("B", c(a=23))) NULL > This is exactly that kind of behavior S4 was invented for, you