From hadley at rice.edu  Thu Nov  4 19:00:10 2010
From: hadley at rice.edu (Hadley Wickham)
Date: Thu, 4 Nov 2010 18:00:10 +0000
Subject: [Rd] Roxygen: @example tag does not work for me
In-Reply-To: <5495425330153933958@unknownmsgid>
References: <5495425330153933958@unknownmsgid>
Message-ID: <AANLkTinmQPaLiPTGY7fEg3jGE3FQRcubq9_1rjn4_va-@mail.gmail.com>

> I thought that @example would take the R code in "tests/foo.R" (this file
> also exists) and append it to the .Rd-file. However, there is no
> \examples{...} section in my roxygen-processed .Rd-file after running
> roxygenize(). It just seems as if @example is just neglected. Should I put
> the file in another directory?

I would suspect that the path would be relative to either man/ or R/ -
so you probably want ../tests/...

But including your unit tests as examples seems like a pretty odd
thing to do - they do serve rather different purposes.

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



[Rd] Roxygen: @example tag does not work for me
Hadley Wickham