[Roxygen-devel] [roxygen2] roxygenise, setGeneric and .svn directory

Hadley Wickham hadley at rice.edu
Mon Aug 15 11:43:31 CEST 2011


> - If I run twice in a row roxygenise, I get error(s) about undefined
> definition for S4 generic functions.
> I guess it is an issue of where the generic are looked for.
> I always define generic as follows:
>
> if ( !isGeneric("myfun") ) setGeneric('myfun', function(x, annotation, ...)
> standardGeneric('myfun'))
>
> as I thought this was the portable way of defining generics. If I remove the
> test for the existence of the generic there are no more errors. Is this test
> actually not required or even not recommend?

Hmmm, I don't think you're supposed to do this - namespaces should
take care of potential conflicts between generics in different
packages.

> - I get lots of warnings linked to permission issues in the .svn
> subdirectories that are copied with the package root directory, e.g.:
>
> In file.create(to[okay]) :
>   cannot create file '../testroxy/.svn/text-base/NAMESPACE.svn-base', reason
> 'Permission denied'
>
> I like the fact the .svn directory are actually copied, as it allows me to
> check for modifications made by roxygenise on the Rd, NAMESPACE or
> DESCRIPTION files. Any way to avoid these warnings?

Hard to know why you're getting these errors without a reproducible
example?  Is the a reason you're not roxygenising in place?

Hadley

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


More information about the Roxygen-devel mailing list