On 17/08/2009 6:03 PM, Ben Bolker wrote:
>   the version 2 parser thinks I have unnecessary braces,
> but I can't find any.  False positive or am I missing
> something?  If a false positive, is there any way to
> work around the warning?

The problem is that % in Rd is different than % in LaTeX: it causes a break. So the comment you have at the end of the first arg to \deqn causes the parser to think you have a one argument version of it, followed by an unnecessarily braced bit of text.

To fix it, change the two lines

{\mbox{Beta}(\theta(1-p),\theta p)}}%
{p(x) = %

to

{\mbox{Beta}(\theta(1-p),\theta p)}%
}{p(x) = %

Duncan Murdoch

>
> * checking Rd files against version 2 parser ... WARNING
> Warning: ./man/dbetabinom.Rd:32-34: Unnecessary braces at ‘{p(x) = %
> (C(N,x)*Beta(N-x+theta*(1-p),x+theta*p))/%
> Beta(theta*(1-p),theta*p)}’
>
> =============
> \details{
>    The beta-binomial distribution is the result of
> compounding a beta distribution of probabilities with
> a binomial sampling process.  The density function is
> \deqn{p(x) = %
> \frac{C(N,x) \mbox{Beta}(N-x+\theta(1-p),x+\theta p)}%
> {\mbox{Beta}(\theta(1-p),\theta p)}}%
> {p(x) = %
> (C(N,x)*Beta(N-x+theta*(1-p),x+theta*p))/%
> Beta(theta*(1-p),theta*p)}
> The parameters \code{shape1} and \code{shape2} are
> the more traditional parameterization in terms of
> the parameters of the per-trial probability distribution.
> }
>
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to