[Rd] \S4method in combination with "[" and "[<-"
Matthias Kohl
Matthias.Kohl at stamats.de
Wed May 21 11:29:17 CEST 2008
Hello Robin,
thanks for your solution!
Other solutions I know:
1. In the Matrix package - version 0.999375-9. See Subassign-methods.Rd
and Xtrct-methods.Rd.
2. The other possibility, which we use in some situations and which for
instance is used in package Biobase (e.g., S4-class eSet), is to
document methods in the Rd-files of the corresponding S4-classes.
However, both solutions are without using "\S4method".
Best,
Matthias
Robin Hankin wrote:
> Hello Matthias
>
> I too struggled with this for a long long time.
>
> I'm not sure if this answers your question, but
> Brobdingnag_1.1-2.tar.gz is clean under R-2.7.0,
> and this package includes S4 methods for extract/replace.
>
> Extract.Rd in the package doesn't use \S4method; also, I
> couldn't figure out how to include a "usage" section
> without R CMD check throwing a wobbly.
>
> Extract.Rd is not ideal, but
> seems to work in practice: the user types ?"[.brob"
> and gets some support, but it would have been better
> to have an explicit usage section too.
>
>
> best wishes
>
>
> rksh
>
>
>
>
>
> On 21 May 2008, at 09:23, Matthias Kohl wrote:
>
>> 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 under
>> http://r-forge.r-project.org/R/?group_id=87.
>>
>> The warning we obtain is
>>
>> Bad \usage lines found in documentation object 'Subsetting-methods':
>> \S4method{[}{SeqDataFrames}(x, i, j, k, drop = FALSE)
>> \S4method{[<-}{SeqDataFrames}(x, i, j, k, value)
>>
>> Of course, we tried several different possibilities but with no success.
>>
>> Does someone know a package which shows a use case for this
>> situation? I looked in several packages but could not found any.
>>
>> Thanks for your help!
>> Matthias
>>
>> --
>> Dr. Matthias Kohl
>> www.stamats.de
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> --
> Robin Hankin
> Uncertainty Analyst and Neutral Theorist,
> National Oceanography Centre, Southampton
> European Way, Southampton SO14 3ZH, UK
> tel 023-8059-7743
>
--
Dr. Matthias Kohl
www.stamats.de
More information about the R-devel
mailing list