Displaying 20 results from an estimated 2000 matches similar to: "List S3 methods and defining packages"
2015 Jul 08
0
List S3 methods and defining packages
Thanks Kevin, this indeed clarifies a bit the S3 method registration universe.
On 8 July 2015 at 15:48, Kevin Wright <kw.stat at gmail.com> wrote:
> Not sure if this answers your question, but you can't unregister a method. See
>
> http://tolstoy.newcastle.edu.au/R/help/06/07/30791.html
>
> Kevin Wright
>
>
> On Wed, Jul 8, 2015 at 5:09 AM, Renaud Gaujoux
>
2015 Jul 07
0
List S3 methods and defining packages
On 07/07/2015 02:05 AM, Renaud Gaujoux wrote:
> Hi,
>
> from the man page ?methods, I expected to be able to build pairs
> (class,package) for a given S3 method, e.g., print, using
>
> attr(methods(print), 'info').
>
> However all the methods, except the ones defined in base or S4
> methods, get the 'from' value "registered S3method for print",
2012 Jun 14
2
"Incompatible methods" for overloaded operator
I'm trying to overload an operator, and I'm running into a strange problem.
It happens when I install and load the package, but not when I simply
source() the code.
I'm defining + for two classes. The R code looks like this:
#' @export
#' @method "+" a
`+.a` <- function (x1, x2) {
message("Running custom + function")
}
#' @export
#' @method
2008 Jul 15
1
methods/namespaces/possible bug
Using
> methods("plot")
[1] plot.Date* plot.HoltWinters* plot.POSIXct*
[4] plot.POSIXlt* plot.TukeyHSD plot.acf*
[7] plot.data.frame* plot.decomposed.ts* plot.default
[10] plot.dendrogram* plot.density plot.ecdf
[13] plot.factor* plot.formula* plot.hclust*
[16] plot.histogram* plot.isoreg* plot.lm
[19] plot.medpolish*
2013 May 08
1
Namespace/inheritance problem in S4 methods for a union class
Hi,
I started this post on bioc-devel but this seems to be more general:
https://stat.ethz.ch/pipermail/bioc-devel/2013-May/004311.html
See reproducible example from Martin below.
Thank you.
Renaud
---------- Forwarded message ----------
From: Martin Morgan <mtmorgan at fhcrc.org>
Date: 7 May 2013 19:55
Subject: Re: [Bioc-devel] ExpressionSet and LumiBatch: inheritance problem
in S4
2009 Aug 05
1
S4 method dispatch: coercion of arguments with setAs defined
Hi list,
I've got a class B that contains a slot obj of class A. I'd like to be
able to call all the methods of class A directly on objects of class B
as if I had called the method on slot obj. This without overloading all
methods of class A to work on class B.
I don't define B as an extension of A, because I want class B to also
work with objects of classes that inherit from
2016 Nov 11
0
.S3methods: issue in content of info data.frame
Hi,
I was trying to get a list of S3 method for a given generic, along with the
package in which they are defined, and I came across what looks like an
issue in the data.frame returned in attribute 'info'. The column 'from'
mostly gets the value "registered S3method for ..." except for visible
methods. Is this the expected behavior?
See code and output below.
Thank you.
2010 Feb 14
1
How S3method() is implemented and called? And when to use it?
R-exts.pdf discribes S3method a little bit. But I want to understand
more on how it is called, implemented and when to use it.
I don't find it in an R session. But I see S3method() in some NAMESPACE files.
> S3method
Error: object 'S3method' not found
> ?S3method
No documentation for 'S3method' in specified packages and libraries:
you could try '??S3method'
I
2009 May 27
1
"Error: package/namespace load failed"
I am writing my first R package, and I have been getting the following series of errors when I run R CMD check:
* checking S3 generic/method consistency ... WARNING
Error: package/namespace load failed for 'REEMtree'
Call sequence:
2: stop(gettextf("package/namespace load failed for '%s'", libraryPkgName(package)),
call. = FALSE, domain = NA)
1: library(package,
2019 Oct 09
2
S3 lookup rules changed in R 3.6.1
tl;dr: S3 lookup no longer works in custom non-namespace environments as of
R 3.6.1. Is this a bug?
I am implementing S3 dispatch for generic methods in environments that are
not
packages. I am trying to emulate the R package namespace mechanism by
having a
?namespace? environment that defines generics and methods, but only exposes
the
generics themselves, not the methods.
To make S3 lookup work
2010 Nov 30
1
warning creating an as.array method in a package
[Env: R 2.11.1, Win Xp, using Eclipse/StatET]
In a package I'm working on, I want to create as.matrix() and as.array()
methods for a particular kind of
object (log odds ratios). These are returned in a loddsratio object as
the $coefficients component,
a vector, but really reflect an underlying (R-1)x(C-1)xstrata array,
whose attributes are contained in other
components.
I define coef,
2004 Oct 17
2
Errors while compiling packages with namespace?
Hello,
I try to set up namespaces for packages. It is fine for several of them,
except one whose compilation fails (under Windows XP & R 2.0.0):
---------- Making package svViews ------------
adding build stamp to DESCRIPTION
installing NAMESPACE file and metadata
Error in parse(file, n, text, prompt) : syntax error on line 21
Execution halted
make[2]: *** [nmspace] Error 1
make[1]: ***
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called
directly by users. rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a
latex method for objects of class "anova.rms" so there are anova.rms and
latex.anova.rms functions in rms. I use:
2010 Dec 09
1
warning creating an as.array method in a package
I posted on this topic to r-help, but never got a sufficient answer, so
I'm reposting here.
[Env: R 2.11.1, Win Xp, using Eclipse/StatET]
In a package I'm working on, I want to create as.matrix() and as.array()
methods for a particular kind of
object (log odds ratios). These are returned in a loddsratio object as
the $coefficients component,
a vector, but really reflect an underlying
2006 Sep 01
1
as.environment(NULL)
Hi
In NEWS, it says
R CMD check now tests that the package can be loaded, and that
the package and namespace (if there is one) can each be loaded
in startup code (before the standard packages are loaded).
For package "onion", I think I have followed all of
sections 1.6.1 - 1.6.6 of R-exts, and it passes R CMD check for
R-2.3.1.
However, using R version 2.4.0 Under
2019 May 14
2
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
CCing r-devel.
On Tue, 14 May 2019 at 02:11, Pavel Krivitsky <pavel at uow.edu.au> wrote:
>
> Dear All,
>
> I've run into this while updating a package with unfortunately named
> legacy functions. It seems like something that might be worth changing
> in R, and I want to get a sense of whether this is a problem before
> submitting a report to the Bugzilla.
>
>
2006 Feb 15
1
S3 generics without NS and cleanEx()
Good morning,
we recently observed a problem with importing S3 generics from a foreign
package (without namespace), defining a S3 method in a package _with_
namespace and the `cleanEx()' function which is automatically generated
and executed before examples are run by R CMD check.
To be more precise. Package `strucchange' defines a S3 generic
sctest <- function(x, ...)
2011 Aug 26
1
methods() not listing some S3 plot methods...?
Dear List,
This may be related to this email thread initiated by Ben Bolker last
month: https://stat.ethz.ch/pipermail/r-devel/2011-July/061630.html
In answering this Question on StackOverflow
http://stackoverflow.com/q/7195628/429846 I noticed that `methods()` was
not listing some S3 methods for `plot()` provided by the mgcv package.
At the time I wanted to check the development version of R as
2011 Oct 28
3
R CMD check and error in an \Sexpr in an Rd file
Hi,
another Rd related issue I encountered is that if an error occurs in an
\Sexpr in an Rd file, then on get the following error:
* checking for portable compilation flags in Makevars ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking examples ... ERROR
Error in paste(before, x, after, sep = "") : object 'exfile' not found
Execution halted
2013 Apr 24
1
Problem with S3 method dispatch and NAMESPACE
I have updated the rms package to extensively use NAMESPACE. I cannot get
certain S3 methods to dispatch. For example I have in NAMESPACE
S3method(anova, rms)
S3method(latex, anova.rms)
anova.rms produces an object of class "anova.rms" and there is a
latex.anova.rms function in rms. But when I do latex(anova(fit)) I get an
invocation of latex.default.
I have tried using