similar to: UseMethod change; isas-tests; all.equal

Displaying 20 results from an estimated 7000 matches similar to: "UseMethod change; isas-tests; all.equal"

2003 Jan 21
0
UseMethod; all.equal; isas-tests
1. UseMethod (via usemethod in objects.c) now uses the definition of class() to dispatch, with the methods package attached (dataClass(x)) and without (attr(x, "class")). Packages using a construction of the form if(is.null(class(x))) class(x) <- data.class(x) UseMethod("foo") should now get similar dispatch with the methods package attached. 2. all.equal and some of its
2003 Jan 17
2
Methods package is now attached by default
The current r-devel (aka R 1.7.0) now attaches the package "methods" by default at startup. A new option, "defaultPackages", is set to c("methods", "ctest") by default, causing the .First in package base to require those two packages at startup. There are two main known differences from having methods attached: - the definition of class() changes, in
2001 Mar 30
0
Re: [Omega-bugs] RSMethods pkg causes data.frame misbehavior in R
Right. The methods such as as.data.frame.numeric don't get dispatched, basically because RSMethods tries to interpret class(x) in the S4 sense (so, e.g. a numeric vector has class "numeric"). Problems can then come from different semantics for S3-style and S4-style methods. The older methods don't dispatch on the mode of vectors (or equivalently, on the value of
2001 Aug 27
1
is.environment, as.environment, and NULL
The r-devel (1.4) code has C implementations now of the class and class<- functions in package methods, and also of as.environment. The last brings up a question (it shows up in the isas-tests test suite). as.environment(NULL) is NULL. Seems like it has to be, since NULL is the environment associated with package:base. But is.environment(NULL) is FALSE, which is also fairly natural, if we
2002 Sep 18
1
problem with make fullcheck on Sparc Solaris 8
I have been trying out R-1.6.0 tarballs (2002-9-10 and 2002-9-17) on: arch sparc os solaris2.8 system sparc, solaris2.8 status beta major 1 minor 6.0 year 2002 month 09 day 17 language R As you see form above, R-1.6.0 compiles fine and works. However, when I "make fullcheck" I get the following error: running code in 'tools-Ex.R' ... OK
2003 Mar 17
0
Changes in checking & error messages
Some fixes have been made to check a few errors better & to report something like the correct error message in other cases. - setMethod will now refuse to set a method for a primitive function for a basic class ("[<-" for "matrix", for example). Previously the method was set but never dispatched. (For a few days, the change prohibited some valid methods for operators,
2005 Apr 10
2
the difference between UseMethod and NextMehod?
hi,usRs,i am studing the R programming,but i can not get the point abut the difference between UseMethod and NextMehod.i have read the manual and try to find the solutin from internet,but i still not master it well.so anyone can give me a guide?it will be better to show some examples . thank you !
2005 Oct 31
0
Minor typos with UseMethod docs (PR#8269)
Full_Name: Mike Kay Version: R-patched OS: Linux Submission from: (NULL) (137.75.70.37) Hi, The following patch cleans up some grammar in the docs for UseMethod (library/base/help/UseMethod) -mike --- UseMethod 2005-09-28 20:06:39.000000000 +0000 +++ /tmp/UseMethod 2005-10-31 21:21:05.534708720 +0000 @@ -5,7 +5,7 @@ Description: R possesses a simple generic function mechanism
2001 Nov 16
0
Best/safest way to use UseMethod()?
I raised the questions below a couple of months ago by sending it to the developers mailing list, but I don't know if it got through since no one replied to it. Looking at the [R] distribution, the UseMethod() is used in the following way: alias <- function(object, ...) UseMethod("alias") or barplot <- function(height, ...) UseMethod("barplot") What I
2004 Nov 15
1
UseMethod call with no arguments
Dear R developers, I will ask a very straightforward question concerning UseMethod's future, because people depending on my code wonder what will happen to it next. In R v2.0.1 NEWS it says o The undocumented use of UseMethod() with no argument is now formally deprecated. and in the R v2.0.1 help(UseMethod) it says 'UseMethod' accepts a call with no arguments and tries to
2003 Mar 26
0
Rprof/UseMethod
I'm having difficulty with Rprof. I have a documentation example test.qss that runs fine without profiling, but under Rprof, > Rprof() > source("test.qss") Error in standardGeneric("model.matrix") : UseMethod used in an inappropriate fashion Luke wrote about a similar circumstance last summer: # From: Luke Tierney (luke@stat.umn.edu) # Date: Fri Jul
2001 Nov 16
1
UseMethod() fails to (PR#1176)
match the argument 'x' if there is another argument with prefix 'x' Full_Name: Henrik Bengtsson Version: 1.3.1 OS: Sun Solaris 8 Submission from: (NULL) (130.235.3.49) I ran into a strange problem with UseMethod(). Run the following code: foo.Bar <- function(this, x=0, xidx=0) { cat("In foo.Bar(): ", this, ", x=", x, ", xidx=", xidx,
2023 Oct 20
0
UseMethod forwarding of local variables
UseMethod has since the beginning had the 'feature' that local variables in the generic are added to the environment in which the method body is evaluated. This is documented in ?UseMethod and R-lang.texi, but use of this 'feature' has been explicitly discouraged in R-lang.texi for many years. This is an unfortunate design decision for a number of reasons (see below), so the plan
2009 Oct 20
1
Suggestion for exception handling: More informative error message for "no applicable method..." (S3)
I'd like to suggest that whenever there is no S3 method implementation available for a particular class, that the error message would also report the class structure of the object dispatched on. Example: foo <- function(...) UseMethod("foo") foo.ClassA <- function(object, ...) { cat("foo() for ClassA called.\n") } > foo(structure(1, class="ClassA"))
2006 May 19
1
UseMethod infelicity
If I do > example(lm) ... > mycoef <- function(object, ...) UseMethod("coef", object) > mycoef(lm.D9) Error in mycoef(lm.D9) : no applicable method for "coef" which is pretty surprising, as coef has a default method. After a bit of digging, this comes from do_usemethod having defenv = environment where the generic was defined */ defenv =
2012 Dec 04
1
inconsistencies between ?class and ?UseMethod
Hi, The 2 man pages give inconsistent description of class(): Found in ?class: If the object does not have a class attribute, it has an implicit class, ?"matrix"?, ?"array"? or the result of ?mode(x)? (except that integer vectors have implicit class ?"integer"?). Found in ?UseMethod: Matrices and arrays have class ?"matrix"?
2003 Sep 05
1
namespaces and S4 methods/classes
The current version of the methods package now has a namespace. Packages using S4 methods and classes can have NAMESPACE files. New directives can be included in NAMESPACE files to import and export classes and methods. Namespaces allow cleaner definition of the API for packages, and are needed for future improvements to R. NOTE: This is a major revision. In principle, it should be back
1999 Apr 16
1
NextMethod
>> One clear moral seems to be don't do anything more inside a >> generic function than you really need to do. Keep it *very* >> simple indeed. >> > I recall JMC saying something like, all generic functions > should be one line long; a call to the appropriate UseMethod. It certainly is encouraging to know that others also have been confused by aspects of
1999 Jul 15
2
R: UseMethod with primitives?
Hello, is the following somehow possible with Mod() being a primitive: "Mod" <- function(x) UseMethod("Mod") "Mod.default" <- function(x) { .Primitive("Mod") ### I know it?s wrong. How can I access the original Mod ? } Thanks for help M. Eger -- +------------------------------------------------------- | Marcus Eger | Philipps Universitaet
2017 Oct 26
0
Error in UseMethod("xmlAttrs", node) : no applicable method for 'xmlAttrs' applied to an object of class "NULL"
I'm running R 3.4.1 on Linux. I'm getting the following error message. Error in UseMethod("xmlAttrs", node) : no applicable method for 'xmlAttrs' applied to an object of class "NULL" Calls: rdKMeans -> rdLoadModel -> xmlAttrs This appears to be a known issue in R Linux that was supposed to be patched. Is this really fixed? Was it fixed in 3.4.2?