[Rd] Rd \usage clause for an S4 replace method

2009-03-13 Thread Sklyar, Oleg (London)
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

Re: [Rd] Rd \usage clause for an S4 replace method

2009-03-13 Thread Prof Brian Ripley
That's not how you use it, surely? The obvious to me \usage{ \S4method{[}{TimeSeries,TimeDate,missing}(x, i, j, ..., drop) \S4method{[}{TimeSeries,TimeDate,missing,ANY}(x, i, j, ...) - value } works. There is an example of a replacement method using \method in 'Writing R Extensions', so