[Roxygen-devel] error exporting "thisName<-" functions

Hadley Wickham hadley at rice.edu
Sun Aug 21 13:23:23 CEST 2011


> when i define a function/method named like "functionName<-", it causes an
> error at installation time if the NAMESPACE file was created by roxygen2. the
> reason is simply the assignment operator "<-" in the name, which is needed for
> functionality like
>
>  functionName(object) <- "new value"
>
> to fix this, roxygenize() could simply quote the names of things to export in
> the created NAMESPACE file, because manually changing the entry did the trick:
>
> fails:
>  exportMethods(methodName<-)
>
> works:
>  exportMethods("methodName<-")

As far as I can tell that's what roxygen produces for me already - I
just added a test to verify it.  Are you sure you have the latest
version (2.1) ?

Hadley


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


More information about the Roxygen-devel mailing list