[Roxygen-devel] [roxygen2] error sourcing the R files (probably environment issue)

Hadley Wickham hadley at rice.edu
Wed Sep 21 23:48:47 CEST 2011


Could you please file an issue at https://github.com/klutometis/roxygen/issues?
Thanks!
Hadley

On Wed, Sep 21, 2011 at 3:44 PM, Renaud Gaujoux <renaud at cbio.uct.ac.za> wrote:
> The sample code in my post should be enough to reproduce the issue.
> I have wrapped it into a package (attached to this post).
>
> Renaud
>
> On 21/09/2011 21:38, Hadley Wickham wrote:
>>>
>>> in one of the R files I have something like this, that defines a
>>> temporary
>>> function in order to define a static variable:
>>>
>>> f<- function(){
>>>    .a<- 0
>>>    function(x=1){
>>>        .a<<- .a + x
>>>        .a
>>>    }
>>> }
>>> f2<- f()
>>> rm(f)
>>>
>>> When running roxygenise on this I get the error:
>>> Error in eval(expr, envir, enclos) : object 'f' not found
>>
>> What does traceback give you?  Could you provide a small reproducible
>> example?
>>
>> Hadley
>>
>>
>
>
>
> ###
>
> UNIVERSITY OF CAPE TOWN
> This e-mail is subject to the UCT ICT policies and e-mail disclaimer
> published on our website at
> http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27
> 21 650 9111. This e-mail is intended only for the person(s) to whom it is
> addressed. If the e-mail has reached you in error, please notify the author.
> If you are not the intended recipient of the e-mail you may not use,
> disclose, copy, redirect or print the content. If this e-mail is not related
> to the business of UCT it is sent by the sender in the sender's individual
> capacity.
>
> ###
>
>
>



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


More information about the Roxygen-devel mailing list