Re: [Rd] S4method

From: Martin Morgan <mtmorgan_at_fhcrc.org>
Date: Fri, 28 Sep 2012 12:39:52 -0700

On 09/28/2012 11:57 AM, David L Lorenz wrote:
> I get an error when I try to use \S4method in a usage section in an Rd
> file for a function. I tried to duplicate exactly how stats4 documents its
> method functions, but I must be missing something. Here is the top part of
> the Rd file:
>
> \name{xyPlot-methods}
> \docType{methods}
> \alias{xyPlot-methods}
> \alias{xyPlot,numeric,numeric-method}
> \title{Methods for Function \code{xyPlot}}
> \description{
> Create a line or scatter plot.
> }
> \usage{
> \S4method{xyPlot}{numeric, numeric}(x, y,
> Plot = list(name = "", what = "lines", type = "solid", width = "standard",
>
> symbol = "circle", filled = TRUE, size = 0.09, color = "black"),
> yaxis.log = FALSE, yaxis.rev = FALSE, yaxis.range = c(NA, NA),
> xaxis.log = FALSE, xaxis.range = c(NA, NA), ylabels = 7, xlabels = 7,
> xtitle = deparse(substitute(x)), ytitle = deparse(substitute(y)),
> caption = "", margin = c(NA, NA, NA, NA))
> }
>

> The error I get is
>
> Bad \usage lines found in documentation object 'xyPlot-methods':
> <unescaped bksl>S4method{xyPlot}{numeric, numeric}(x, y,

Hi David - R is being picky about spaces; use {numeric,numeric}. Martin

> Plot = list(name = "", what = "lines", type = "solid", width =
> "standard",
> symbol = "circle", filled = TRUE, size = 0.09, color = "black"),
> yaxis.log = FALSE, yaxis.rev = FALSE, yaxis.range = c(NA, NA),
> xaxis.log = FALSE, xaxis.range = c(NA, NA), ylabels = 7, xlabels = 7,
> xtitle = deparse(substitute(x)), ytitle = deparse(substitute(y)),
> caption = "", margin = c(NA, NA, NA, NA))
>
> Here's my R info:
>
> R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
> Copyright (C) 2012 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
> Platform: x86_64-pc-mingw32/x64 (64-bit)
>
> The error is treated as a WARNING, so I can build and install the
> package and the documentation file looks fine when I ask for help on
> xyPlot-methods. What am I missing?
> Thanks.
> Dave
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri 28 Sep 2012 - 19:44:25 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 29 Sep 2012 - 18:50:45 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive