Displaying 20 results from an estimated 26 matches for "s4method".
Did you mean:
s3method
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 o...
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 able to insert line breaks within the
signature list [or at least insert line brea...
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 bksl>S4method{enrichmentCalc}{GenomeData, BSgenome}(rs, organism, seqLen=NULL, do.warn=FALSE)
<unescaped bksl>S4method{enrichmentCalc}{GRanges, BSgenome}(rs, organism, seqLen=NULL)
Functions wi...
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 bksl>S4method{enrichmentCalc}{GenomeData, BSgenome}(rs, organism, seqLen=NULL, do.warn=FALSE)
<unescaped bksl>S4method{enrichmentCalc}{GRanges, BSgenome}(rs, organism, seqLen=NULL)
Functions wi...
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]
\S4method{[<-}{TimeSeries,TimeDa...
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 meth...
2020 May 22
3
Compatibility issues caused by new simplify argument in apply function
....applyInHelp1("Speclib", usage = TRUE)
}
\arguments{
..
*Function .applyInHelp1*
.applyInHelp1 <- function(fun_name, usage)
{
if (usage)
{
if ("simplify" %in% names(formals(base::apply)))
{
return(paste0("\\usage{\n",
"\\S4method{apply}{", fun_name, "}(X, MARGIN, FUN, ...,
simplify = TRUE)\n",
"}"))
} else {
return(paste0("\\usage{\n",
"\\S4method{apply}{", fun_name, "}(X, MARGIN, FUN, ...)
\n",
&quo...
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
...nHelp1*
> > .applyInHelp1 <- function(fun_name, usage)
> > {
> > if (usage)
> > {
> > if ("simplify" %in% names(formals(base::apply)))
> > {
> > return(paste0("\\usage{\n",
> > "\\S4method{apply}{", fun_name, "}(X, MARGIN, FUN, ...,
> > simplify = TRUE)\n",
> > "}"))
> > } else {
> > return(paste0("\\usage{\n",
> > "\\S4method{apply}{", fun_name, "}(X,...
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 raises the following warning:
Bad \usage lines found in documentation object '%append%-...
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 suit le texte anglais.
----------------------------------------------...
2011 Feb 24
0
Rd, S4 classes and PDFs
...age 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.
The generated PDFs look terrible because there is no way to get line breaks
into these \item titles (?) and so a lot of lines just overflow the page.
Manually writing the docs and using \S4method is a noticeable improvement since it
a) s...
2020 May 22
0
Compatibility issues caused by new simplify argument in apply function
...ts{
> ..
>
> *Function .applyInHelp1*
> .applyInHelp1 <- function(fun_name, usage)
> {
> if (usage)
> {
> if ("simplify" %in% names(formals(base::apply)))
> {
> return(paste0("\\usage{\n",
> "\\S4method{apply}{", fun_name, "}(X, MARGIN, FUN, ...,
> simplify = TRUE)\n",
> "}"))
> } else {
> return(paste0("\\usage{\n",
> "\\S4method{apply}{", fun_name, "}(X, MARGIN, FUN, ...)
> \...
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
...39;, and the
following in plot-methods.Rd would be ok:
---<--------------------cut here---------------start------------------->---
\name{plot-methods}
\docType{methods}
\alias{plot-methods}
\alias{plot}
\alias{plot,track,missing-method}
\title{Methods}
\description{A plotting method}
\usage{\S4method{plot}{track,missing}(x, \ldots)}
\arguments{
\item{x}{track.}
\item{\ldots}{Arguments passed to \code{\link{plot}}.}
}
\section{Methods}{
\describe{
\item{plot}{\code{signature(x="track", y="missing")}: some plot.}
}
}
\keyword{methods}
---<--------------------cut...
2011 Dec 16
0
Rd error message
...solve,gchol.bdsmatrix-method}
\description{
Solves a system of linear equations where the coefficient matrix is
upper (or \sQuote{right}, \sQuote{R}) or lower (\sQuote{left},
\sQuote{L}) triangular.\cr
\code{x <- backsolve(R, b)} solves \eqn{R x = b}.
}
\usage{
backsolve(r, \dots)
\S4method{backsolve}{gchol}(r, x, k=ncol(r), upper.tri=TRUE, \dots)
\S4method{backsolve}{gchol.bdsmatrix}(r, x, k=ncol(r), upper.tri=TRUE,
\dots)
}
\arguments{
\item{r}{a matrix or matrix-like object}
\item{x}{a vector or a matrix whose columns give the right-hand sides
for
the equations.}
\item{...
2010 Aug 25
1
Documenting S4 Methods
...... ...
\docType{methods}
... ... ...
\alias{methodName,class-method}
... ... ...
\usage{methodName(arg1)}
... ... ...
and
... ... ...
\alias{methodName,class-method}
... ... ...
\usage
{
\S4method{methodName}{class}(arg1)
}
... ... ...
I've seen both ways used for S4 methods and don't know what is the underlying difference.
I haven't been able to find any good tutorials for the new S4 architecture (written post 2006), so I'm not sure where to start with S4...
2007 Aug 30
1
suggesting \alias* for Rd files (in particular for S4 method documentation)
...\alias*{write.image,Image,missing-method}
\alias*{write.image,Image,character-method}
Alternatively:
\alias{write.image}
\alias[hide]{write.image,Image,missing-method}
\alias[hide]{write.image,Image,character-method}
Any comments?
For me, the current way around is to avoid usage sections with \S4method
all together, substituting them with pairs of
\section{Usage}{\preformatted{
}}
\section{Arguments}{
}
and putting all aliases marked above with * into internals, which is
definitely not the best way of going around documentation and
code/documentation mismatches.
Best regards,
Oleg
--
Dr. Ole...
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_C...