[Roxygen-devel] [roxygen2] error sourcing the R files (probably environment issue)
Renaud Gaujoux
renaud at cbio.uct.ac.za
Wed Sep 21 22:44:01 CEST 2011
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.
###
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_1.0.tar.gz
Type: application/x-gzip
Size: 479 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/roxygen-devel/attachments/20110921/161c9a7e/attachment.bin>
More information about the Roxygen-devel
mailing list