search for: s3class

Displaying 20 results from an estimated 20 matches for "s3class".

Did you mean: class
2008 Aug 15
3
Rcommander installation fails on Fedora 9
...inexpcov? Convenience.h:8: warning: type defaults to ?int? in declaration of ?SEXP? Convenience.h:8: error: expected ?;?, ?,? or ?)? before ?linexpcov? Convenience.h:9: error: expected declaration specifiers or ?...? before ?SEXP? In file included from party.h:22, from Classes.c:9: S3Classes.h:2: error: expected ?)? before ?node? S3Classes.h:3: error: expected ?)? before ?node? S3Classes.h:4: error: expected ?)? before ?node? S3Classes.h:5: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?S3get_nodeweights? S3Classes.h:6: error: expected ?)? before ?node? S3Classes.h:7...
2004 Jan 22
1
Please help with \usage{} for [.S3Class in Rd-Format
Dear all, I try to submit a library to CRAN but can't overcome the last R CMD CHECK. Can someone enlighten me how to put the \usage{} section for an S3-Method extractor defined as > args(get("[.refdata")) function (x, i = NULL, j = NULL, drop = FALSE, ref = FALSE) NULL I read the "Writing R Extensions" manual and know about \methods{generic}{class}, however I
2015 Jun 12
3
RFC: Declaring "foo.bar" as nonS3method() ?!
On 12/06/2015 10:53 AM, Hadley Wickham wrote: > To me, it seems like there's actually two problems here: > > 1) Preventing all() from dispatching to all.effects() for objects of > class effects > 2) Eliminating the NOTE in R CMD check > > My impression is that 1) actually causes few problems, particularly > since people are mostly now aware of the problem and avoid
2012 Dec 12
1
Lost in S4 and S3 classes
...ss in a "constructor function" I can do something like this (correct?): myConstructor <- function() { return(new("TestClass")) } pippo <- myConstructor() > pippo An object of class "TestClass" Slot "lmOutput": <S4 Type Object> attr(,".S3Class") [1] "nls.lm" Slot "anumeric": numeric(0) And the object "pippo" seems correctly initialized. If I use this code instead I got an error: myConstructor2 <- function() { pippo <- new("TestClass", anumeric=1000) return(pippo) } > pippo...
2010 May 17
1
format.data.frame containing S4 class with format method
...mal class 'data.frame' [package "methods"] with 4 slots ..@ .Data :List of 1 .. ..$ :Formal class 'A' [package ".GlobalEnv"] with 1 slots .. .. .. ..@ .Data: chr "aaa" ..@ names : chr "a" ..@ row.names: chr "1" ..@ .S3Class : chr "data.frame" Is there another step I should be taking so that "A"'s format method is found and used? Thank you, Dan Murphy [[alternative HTML version deleted]]
2015 May 12
2
Unexpected failure when calling new() with unnamed arg and
...initialize" method should take care of? Another singularity that is maybe at the root of all of this is that the "formula" S4 class is virtual: showClass("formula") # Virtual Class "formula" [package "methods"] # # Slots: # # Name: .S3Class # Class: character # # Extends: "oldClass" so a bare call to new("formula") fails: new("formula") # Error in new("formula") : # trying to generate an object from a virtual class ("formula") Shouldn't new("formula&quot...
2015 May 13
2
Unexpected failure when calling new() with unnamed arg and
...maybe at the root of all of this is that >> the "formula" S4 class is virtual: > >> showClass("formula") >> # Virtual Class "formula" [package "methods"] >> # >> # Slots: >> # >> # Name: .S3Class >> # Class: character >> # >> # Extends: "oldClass" > >> so a bare call to new("formula") fails: > >> new("formula") >> # Error in new("formula") : >> # trying to generate an object fro...
2016 Aug 02
0
save/load + all.equal on reference class objects
....character.factor(target) : attempting to coerce non-factor Digging into this a bit I can see that all.equal() is attempting to compare a 'current' and 'target' that both look like this: str(current) Formal class 'ordered' [package "methods"] with 1 slot ..@ .S3Class: chr [1:2] "ordered" "factor" Browse[1]> current Object of class "ordered" ordered(0) Levels: ... but I can't really make much more sense of it than that. In contrast, this works fine: fm2 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy) all.equal(...
2009 Jan 22
0
Confused about behavior of an S4 object containing a ts object
..."description": [1] "My Time Series" > str(tmp) Formal class 'tsExtended' [package ".GlobalEnv"] with 4 slots ..@ .Data : int [1:20] 1 2 3 4 5 6 7 8 9 10 ... ..@ description: chr "My Time Series" ..@ tsp : num [1:3] 1 5.5 2 ..@ .S3Class : chr "ts" > tmp[,1] Time Series: Start = c(1, 1) End = c(5, 2) Frequency = 2 [1] 1 2 3 4 5 6 7 8 9 10 > plot(tmp[,2]) Mark Lyman -----Original Message----- From: Lyman, Mark Sent: Thursday, December 18, 2008 1:02 PM To: 'r-help at r-project.org' Subject:...
2008 Jul 28
0
S4 classes that extend S3 classes
...ith a bug fix r46136 July 28). So if you can live with the limitations of the first point and would like to experiment with extending an S3 class, you're invited to try. Note that the S3 classes _must_ be registered via setOldClass() for extensions to work. See ?Classes, ?setOldClass and ?S3Class for details. John
2011 Jan 31
1
Generic Functions and Dates
I'm trying to write a generic function that calls different methods depending on the structure of the argument, but not the exact type of its contents. For example, the function 'nan2last' below works for a numeric vector but not for a vector of Date objects. Is there any way to make it work on any vector? setGeneric("nan2last", function(x) {
2015 Oct 08
1
Unexpected failure when calling new() with unnamed arg and
...class is virtual: >>>> >>> >>> showClass("formula") >>>> # Virtual Class "formula" [package "methods"] >>>> # >>>> # Slots: >>>> # >>>> # Name: .S3Class # Class: character >>>> # >>>> # Extends: "oldClass" >>>> >>> >>> so a bare call to new("formula") fails: >>>> >>> >>> new("formula") >>&gt...
2015 May 13
0
Unexpected failure when calling new() with unnamed arg and
...of? > Another singularity that is maybe at the root of all of this is that > the "formula" S4 class is virtual: > showClass("formula") > # Virtual Class "formula" [package "methods"] > # > # Slots: > # > # Name: .S3Class > # Class: character > # > # Extends: "oldClass" > so a bare call to new("formula") fails: > new("formula") > # Error in new("formula") : > # trying to generate an object from a virtual class ("formula") &...
2015 Oct 08
0
Unexpected failure when calling new() with unnamed arg and
...>>> the "formula" S4 class is virtual: >>> >> >> showClass("formula") >>> # Virtual Class "formula" [package "methods"] >>> # >>> # Slots: >>> # >>> # Name: .S3Class >>> # Class: character >>> # >>> # Extends: "oldClass" >>> >> >> so a bare call to new("formula") fails: >>> >> >> new("formula") >>> # Error in new("formula") :...
2008 Oct 20
2
R 2.8.0 is released
...at are registered by a call to setOldClass() now have the S3 class as a special slot, and therefore so do any S4 classes that contain them. This mechanism is used to support S4 classes that extend S3 classes, to the extent possible. See ?Classes, ?setOldClass, and ?S3Class. The treatment of special pseudo-classes "matrix", "array", and "ts" as S4 classes has also been modified to be more consistent and, within limitations imposed by special treatment of these objects in the base code, to allow other...
2008 Oct 20
2
R 2.8.0 is released
...at are registered by a call to setOldClass() now have the S3 class as a special slot, and therefore so do any S4 classes that contain them. This mechanism is used to support S4 classes that extend S3 classes, to the extent possible. See ?Classes, ?setOldClass, and ?S3Class. The treatment of special pseudo-classes "matrix", "array", and "ts" as S4 classes has also been modified to be more consistent and, within limitations imposed by special treatment of these objects in the base code, to allow other...
2009 Jun 26
0
R 2.9.1 is released
...s better non-convergence messages in some cases. o S3 method dispatch will support S4 class inheritance for S3 methods, for primitives and via UseMethod(), if the argument S3methods=TRUE is given to setClass(). S4 method dispatch will use S3 per-object inheritance if S3Class() is set on the object. See ?Methods and the paper referenced there. o R CMD INSTALL is more tolerant of (malformed) packages with a 'man' directory but no validly named .Rd files. o R CMD check now reports where options are used that cause some of the...
2009 Jun 26
0
R 2.9.1 is released
...s better non-convergence messages in some cases. o S3 method dispatch will support S4 class inheritance for S3 methods, for primitives and via UseMethod(), if the argument S3methods=TRUE is given to setClass(). S4 method dispatch will use S3 per-object inheritance if S3Class() is set on the object. See ?Methods and the paper referenced there. o R CMD INSTALL is more tolerant of (malformed) packages with a 'man' directory but no validly named .Rd files. o R CMD check now reports where options are used that cause some of the...
2009 Apr 17
0
R 2.9.0 is released
...function unzip() in package 'utils' to expand or list zip archives. o Replacement functions for class() and oldClass() will unset the S4 bit when the replacement can't be an S4 object; oldClass() will return the S3 class for S4 objects with slot .S3Class. o clip() takes extra steps to avoid the next graphics call resetting the clip region. o New function sample.int() to provide documented access to the internal part of sample() (sampling from seq_len(n)). o New version of withVisible() for better handling of cas...
2009 Apr 17
0
R 2.9.0 is released
...function unzip() in package 'utils' to expand or list zip archives. o Replacement functions for class() and oldClass() will unset the S4 bit when the replacement can't be an S4 object; oldClass() will return the S3 class for S4 objects with slot .S3Class. o clip() takes extra steps to avoid the next graphics call resetting the clip region. o New function sample.int() to provide documented access to the internal part of sample() (sampling from seq_len(n)). o New version of withVisible() for better handling of cas...