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

Renaud Gaujoux renaud at cbio.uct.ac.za
Thu Sep 22 12:21:25 CEST 2011


Done:
https://github.com/klutometis/roxygen/issues/42

Thank you

On 21/09/2011 23:48, Hadley Wickham wrote:
> 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.
>>
>> ###
>>
>>
>>
>
>



###

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.

###
 



More information about the Roxygen-devel mailing list