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

From: Hadley Wickham <hadley_at_rice.edu>
Date: Thu, 04 Nov 2010 18:00:10 +0000

> 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/

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 04 Nov 2010 - 18:03:37 GMT

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 Fri 05 Nov 2010 - 09:30:16 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