Herik's suggestion is an absolutely good practice which guarantees the
device is always closed. That is what I did in the knitr package, so
you can probably take a look at http://yihui.name/knitr/

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Wed, Apr 4, 2012 at 2:52 PM, Alexander Shenkin <ashen...@ufl.edu> wrote:
> Thanks for the reply, Henrik.  Process Explorer still shows the file
> handle as being open, but R only shows the following:
>
>> showConnections(all=TRUE)
>  description class      mode text   isopen   can read can write
> 0 "stdin"     "terminal" "r"  "text" "opened" "yes"    "no"
> 1 "stdout"    "terminal" "w"  "text" "opened" "no"     "yes"
> 2 "stderr"    "terminal" "w"  "text" "opened" "no"     "yes"
>>
>
> On 4/4/2012 2:45 PM, Henrik Bengtsson wrote:
>> See ?closeAllConnections
>>
>> Suggestion to the maintainer of Sweave: "atomify" the figure
>> generation, e.g. use { pdf(); on.exit(dev.off()); {...}; } or similar,
>> instead of { pdf(); {...}; dev.off(); } possibly by leaving a copy of
>> the fault figure file for troubleshooting.
>>
>> /Henrik
>>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to