Displaying 20 results from an estimated 7000 matches similar to: "S4 plot generic documentation"
2010 Aug 25
1
Documenting S4 Methods
I'm in the process of converting some S3 methods to S4 methods.
I have this function :
setGeneric("enrichmentCalc", function(rs, organism, seqLen, ...){standardGeneric("enrichmentCalc")})
setMethod("enrichmentCalc", c("GenomeDataList", "BSgenome"), function(rs, organism, seqLen, ...) {
... ... ...
})
2007 Jan 31
2
Problems with definitions of S4-generics
Hello all,
I'd like to report a problem related to S4 classes.
Platform:
Mac G4/400 PCI (PPC-architecture)
Mac OS 10.4.8
R 2.4.1 for Mac OS X (CRAN binary, 2006-12-19) w/ R.app 1.18
Last December, Simon Urbanek confirmed that the issue is not platform
related, and that it is most likely a bug. He suggested to post my report
to "the appropriate mailing list" -- I choose r-devel.
2012 Apr 12
1
R-2.15.0 and Exporting Methods Converted To S4 Generic
Late to the show on this release, unfortunately.
One of our production packages no longer builds under R-2.15.0
with the following message.
** testing if installed package can be loaded
Error: Function found when exporting methods from the namespace
'SuperCurve' which is not S4 generic: 'image'
Possibly relevant clues follow:
## From R/AllGenerics.R
if
2006 Feb 14
3
S4 classes and methods with optional arguments
Hi,
i have used S4 classes to implement a unified access to random number generators
(package rstream on CRAN).
I have used a construct to allow optional arguments:
if(!isGeneric("rstream.sample"))
setGeneric("rstream.sample", function(stream,...) standardGeneric("rstream.sample"))
setMethod("rstream.sample",
2003 Sep 27
2
does isGeneric work differently in 1.8.0 ?
Hello,
the last command (isGeneric) in following R-code (attached) produces
different output, depending on wheter 1.8.0 alpha or 1.7.1 is used.
Is that to be expected ?
Both R Versions were started with option vanilla
---------------------------------------------------
R.1.7.1:
---------------------------------------------------
> version
_
platform i686-pc-linux-gnu
arch i686
2010 Apr 25
0
S4 generic and method arguments -- "expanded signature"
Hello R-List,
** This e-mail was initially bounced. Please forgive any duplicates.**
I'm creating a new generic function and 3 associated methods, in
which each of the methods only needs a subset of the arguments
specified in the generic.
So, I create the generic like so (with the signature defaulting to all
of the args) ...
setGeneric(
name="myFunction",
def =
2007 Aug 07
1
S4 methods: unable to find an inherited method
Hello all,
I consider myself pretty new to the whole OO based programming so
I'm sorry if I'm doing something stupid.
> xml<-read.metlin(url)
Error in function (classes, fdef, mtable) :
unable to find an inherited method for function "read.metlin",
for signature "url"
>read.metlin
standardGeneric for "read.metlin" defined from package
2007 Mar 29
0
S4 generic surprise
I discovered the following behavior when source'ing the same file
repeatedly as I edited it. My generic stopped acting like a generic. I
can't tell from the docs what, if any, behavior is expected in this
case. R 2.4.0
> foo <- function(object) 3
> isGeneric("foo")
[1] FALSE
> setMethod("foo", "matrix", function(object) 4)
Creating a new
2004 Jun 19
0
setGeneric / standardGeneric when args are not "literals" - corrected
This is a correction to my previous message, I forgot to swap two lines
in the body of setMakeGenericMethod. Sorry about that. The correct (full
message) reads like this:
Hi,
This works
> setGeneric("clear", function(obj) standardGeneric("clear"))
[1] "clear"
but this doesn't. Why?
> funName <- "clear"
> setGeneric(funName,
2005 Jun 17
1
(PR#7951) DispatchOrEval missing in do_isfinite and do_isinfinite
Hi,
OK, if you try to explicitly make them generic, you are told that they
are implicitly already generic:
> setGeneric("is.finite", function(from, ...) standardGeneric("is.finite"))
Error in setGeneric("is.finite", function(from, ...)
standardGeneric("is.finite")) :
"is.finite" is a primitive function; methods can be defined, but
the
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
Interrogating some (of my own) code in another package.
>norm.meth <- getMethod("normalize", "MatrixLike")
>message("str(norm.meth)")
>str(norm.meth)
>message("show(norm.meth at .Data)")
>show(norm.meth at .Data)
Last show() displays this:
function (object, ...)
{
.local <- function (object, method = c("median",
2007 May 30
2
S4 assignment \alias and \usage
What is the Rd file alias and usage syntax for an S4 assignment method?
I have been trying variations on
\alias{TSdoc<-,default-method}
\usage{
\S4method{TSdoc}{default}(x) <- value
but so far I have not got it right according to various codoc, etc, checks.
Paul Gilbert
====================================================================================
La version fran?aise
2015 Jan 28
0
[Q] Get formal arguments of my implemented S4 method
Would you please clarify your exact use case?
Thanks,
Michael
On Wed, Jan 28, 2015 at 9:02 AM, Roebuck,Paul L <PLRoebuck at mdanderson.org>
wrote:
> Interrogating some (of my own) code in another package.
>
> >norm.meth <- getMethod("normalize", "MatrixLike")
> >message("str(norm.meth)")
> >str(norm.meth)
>
>
2007 Apr 02
0
Object problems with Generic and rematchDefinition
Hello all,
Let me try this again with some code.
I am trying to make a new object and it's not working. I get :
Error in rematchDefinition(definition, fdef, mnames, fnames, signature) :
methods can add arguments to the generic only if '...' is an
argument to the generic
as my error. I have included my code. It is from the xcms package.
Any help would be great even if
2015 Jan 29
0
[Q] Get formal arguments of my implemented S4 method
At this point I would just due:
formals(body(method)[[2L]])
At some point we need to figure out what to do with this .local() confusion.
On Wed, Jan 28, 2015 at 10:07 AM, Roebuck,Paul L <PLRoebuck at mdanderson.org>
wrote:
> I'm attempting to reflect the information for use with corresponding
> fields in GUI (in a different package), to provide default values,
> argname
2004 Jun 26
1
S4 group "Math", "getGroupMembers", "genericForPrimitive"
Hi,
I found the following on Windows 2000/NT
R Version 1.9.1 (2004-06-21) (also Version 1.9.0):
The S4 group "Math" doesn't work as documented; i.e., "log", "log10",
"gamma" and "lgamma" are included
in the documentation but don't work. See example code below.
Moreover, what about 'genericForPrimitive' which is used
in
2010 Jun 09
0
Documenting generic S4 replacement method for package building
Dear List Members,
I'm struggling with the documentation of a generic S4 replacement method.
I've created a S4 method "lows" via
setGeneric("lows", function(object) standardGeneric("lows"))
setGeneric("lows<-", function(object, value) standardGeneric("lows<-"))
setMethod("lows", "myClass", function(object)
{
2008 May 20
1
S4 generic for lowess
Hi,
A lowess method is defined in our package for one of our S4 classes. To
explicitely define the generic this is being used
if (!isGeneric("lowess"))
setGeneric("lowess", useAsDefault = lowess)
This works fine for many other methods inherited from various R
packages. In this case a warning is issued in R CMD check:
* checking R code for possible problems ... NOTE
2008 Feb 24
2
Generic Functions
Hi
I have some problems in defining new generic functions and classes. Just
have a look at the following example:
require(fPortfolio)
setClass("PROBECLASS",
representation(
type="character"
)
)
isGeneric("setType<-")
#Returns
TRUE
#I would like to define a specific function for
2008 Feb 24
2
Generic Functions
Hi
I have some problems in defining new generic functions and classes. Just
have a look at the following example:
require(fPortfolio)
setClass("PROBECLASS",
representation(
type="character"
)
)
isGeneric("setType<-")
#Returns
TRUE
#I would like to define a specific function for