[R] closing file with close(file) *silently*

Federico Calboli f.calboli at imperial.ac.uk
Tue Mar 6 18:53:48 CET 2012

Hi All,

I am writing a function that reads a file in

myfile = file('myfile.raw', 'rb')

No matter what, I get the warning

Warning message:
closing unused connection 3 (myfile.raw)

Since the whole thing is in a function, I'd like to avoid unecessary noise for the user, and I'd like to kill the warning -- without having to mess with global options.

Any ideas how?




Federico C. F. Calboli
Neuroepidemiology and Ageing Research
Imperial College, St. Mary's Campus
Norfolk Place, London W2 1PG

Tel +44 (0)20 75941602   Fax +44 (0)20 75943193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com

More information about the R-help mailing list