Displaying 20 results from an estimated 26 matches for "s4methods".
Did you mean:
s3methods
2008 May 21
2
\S4method in combination with "[" and "[<-"
Dear developers,
We want to use "\S4method" to document new S4-methods for "[" and "[<-".
We use this for other functions/methods and it works without any
problem, but in case of "[" and "[<-" we didn't manage to bring this to
work.
The problem occurs in the development version of our package "distrSim"
which can be found
2009 Sep 07
1
some (minor) Rd issue: line breaking in \S4method within \usage{}
Hi,
this is perhaps not so much an issue, but as you are currently
working on the Rd parser anyway...
When you want to document specific S4 methods for an S4 generic
by \S4method{} within a \usage{} environment, and the second
(signature_list) argument is "long", be it because you use multiple
dispatch, be it because you use long class-names, (or both), one
would probably like to be
2003 Aug 24
2
setClass question
I would like to add a class to the SparseM package. I have a class "matrix.csr"
that describes a matrix in compressed sparse row format, now I would like a class
matrix.diag.csr that describes such objects when they happen to be diagonal.
The idea is that matrix.diag.csr objects should behave (later in life) exactly like
matrix.csr objects, the distinction is only needed in order to
2010 Aug 30
2
S4 Method Rd Warning
Hello,
I am using R 2.11.0. I have a curious problem where I get a warning in R CMD check which is seemingly not relevant to my Rd file.
The warning says :
* checking Rd \usage sections ... WARNING
Bad \usage lines found in documentation object 'enrichmentCalc':
<unescaped bksl>S4method{enrichmentCalc}{GenomeDataList, BSgenome}(rs, organism, seqLen=NULL, ...)
<unescaped
2010 Aug 30
2
S4 Method Rd Warning
Hello,
I am using R 2.11.0. I have a curious problem where I get a warning in R CMD check which is seemingly not relevant to my Rd file.
The warning says :
* checking Rd \usage sections ... WARNING
Bad \usage lines found in documentation object 'enrichmentCalc':
<unescaped bksl>S4method{enrichmentCalc}{GenomeDataList, BSgenome}(rs, organism, seqLen=NULL, ...)
<unescaped
2009 Mar 13
1
Rd \usage clause for an S4 replace method
Given S4 methods [ and [<-, how do I write the Rd-file usage clause for
the latter one?
What I have now is:
\S4method{[}{TimeSeries,TimeDate,missing}(x, i, j, ..., drop)
\S4method{[<-}{TimeSeries,TimeDate,missing,ANY}(x, i, j, ..., value)
which results in the following output:
## S4 method for signature 'TimeSeries, TimeDate, missing':
x[i, j, ..., drop]
2016 Nov 03
0
.S4methods inconsistent behavior with methods, .S3methods
If I call
.S4methods(sd)
I get the error
## Error in getGeneric(generic.function) :
## argument 'f' must be a string, generic function, or primitive:
got an ordinary function
By contrast, methods and .S3methods just state that no methods are found.
methods(sd)
## no methods found
S3methods(sd)
## no metho...
2020 May 22
3
Compatibility issues caused by new simplify argument in apply function
Dear R Developers,
the new simplify argument in apply causes that my package (hsdar) does not
pass the
checks in R-devel.
The workaround, Kurt Hornik send me, is working for the R-code:
if("simplify" %in% names(formals(base::apply)))
do something
else
do something else
Unfortunately, I cannot conditionalize the man pages of the functions. I get
the message
that
2006 Jun 15
0
S4 class slot name 'names' is not allowed (PR#8768 S4Methods)
Hello,
Besides the problem with using "names," one has a similar problem using
".Data" together with "VIRTUAL."
Consider the top of p. 295 of the green book. This should work (I had to
change "structure" to "junk" because "structure" is a sealed class
definition):
setClass("junk",
2020 May 22
2
Compatibility issues caused by new simplify argument in apply function
Interesting problem. I'm very rusty on S4 but would one solution be
to, already now, add 'simplify = TRUE' to the S4 method and document
it;
setMethod("apply", signature(X = "Speclib"),
function(X,
FUN,
bySI = NULL,
...,
simplify = TRUE) {
?
Henrik
On Fri, May 22, 2020 at 6:26
2011 Feb 21
1
Problem with documentation of user-defined operator (S4 method)
Dear list members,
I have defined a binary operator %append% with methods for some S4
classes. In my documentation file, I want to list the methods explicitly
by using e.g.:
\S4method{\%append\%}{RecLinkData,RecLinkData}(x, y)
In the HTML documentation this comes out right as
## S4 method for signature 'RecLinkResult,RecLinkResult'
x %append% y
, but R CMD check
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
2011 Feb 24
0
Rd, S4 classes and PDFs
Hi,
I'm documenting a package that makes heavy use of S4 methods at the moment, and
I'm having a hard time from keeping the PDF output of Rd from looking really
terrible.
First of all, what is the preferred way to actually document S4 methods? When I
use promptClass/promptMethod, I get a style that doesn't use the \S4method
macro and puts the entire function signature into a \item.
2020 May 22
0
Compatibility issues caused by new simplify argument in apply function
You didn't explained what the error is. This is what it looks like to
me, but I'm probably wrong in some details:
1. R-devel added an argument to the apply() function, so the header has
changed from
function (X, MARGIN, FUN, ...)
to
function(X, MARGIN, FUN, ..., simplify = TRUE)
2. Your package converted the function apply() to an S4 generic.
3. Now the signatures of your
2010 Dec 20
2
.Rd file for S4-method warning
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101220/d04ff621/attachment.pl>
2010 Sep 16
0
S4 plot generic documentation
Hi,
Say we want to supply a generic plot() in a package with a simple class,
like this:
---<--------------------cut here---------------start------------------->---
setClass("track",
representation=representation(x="numeric", y="numeric"))
if (!isGeneric("plot")) {
setGeneric("plot",
function(x, y, ...)
2011 Dec 16
0
Rd error message
I get the following error from one of my Rd files in R CMD check (R
2-14.0)
* checking Rd files ... WARNING
Error in switch(attr(block, "Rd_tag"), TEXT = if (!grepl("^[[:space:]]*
$", :
EXPR must be a length 1 vector
problem found in ?backsolve.Rd?
This is likely something that will be glaringly obvious once it's
pointed out, but without a line number I can't
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 Aug 30
1
suggesting \alias* for Rd files (in particular for S4 method documentation)
Hi,
I do not know if everybody finds index pages of the html-formatted R
help useful, but I know I am at least not the only one who uses them
extensively to get the overview of functions and methods in a package
(even for my own package). Problems arise, however, if a lot of S4
methods need to be documented blowing out the index with (generally
irrelevant) entries like:
2008 May 23
1
seeing an S4 method, not using it
...on trace, I found that the correct show method was used
after this command line:
methods::.TraceWithMethods("show", browser, signature = "pixmap", where
= .GlobalEnv)
But I admit I did not go much further in .TraceWithMethods.
I did not find related topics among known bugs (S4methods section), yet
I found this possibly related topic:
http://tolstoy.newcastle.edu.au/R/e2/devel/07/05/3111.html
but this did not give me an answer.
Is this a normal behaviour?
Here is my sessionInfo (second session):
> sessionInfo()
R version 2.7.0 (2008-04-22)
i686-pc-linux-gnu
locale:
LC_CT...