[R] Closing files after using write

Henrique Dallazuanna wwwhsd at gmail.com
Mon Dec 21 18:28:41 CET 2009


Try:

closeAllConnections()

On Mon, Dec 21, 2009 at 3:22 PM, Nick Torenvliet
<nick.torenvliet at gmail.com> wrote:
> When I run the following code in a loop I get an error after about 125 times
> saying too many open files...
>
>
> if(inherits(atmpt, "try-error")){
>            output <- paste(yahooSymbol,"\n",sep="")
>            write(output, file = "data", append = TRUE, sep = "")
> } else {
>
>
> I've tried various things to close the file after write opens it, and looked
> through the RBase docs... but I can't find anything that succesfully closes
> the file.
>
> This is obviously trivial... any ideas
>
> Nick
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list