[R] RSQLite +textConnection()

Seth Falcon sfalcon at fhcrc.org
Tue Nov 28 22:56:06 CET 2006


"Alexander Nervedi" <alexnerdy at hotmail.com> writes:
> Hi Seth,
>
> Thank you for taking the trouble to look. I have created some code
> that simulates the problem. SOme additional observations are:
>
> a) After giving the error "Error in textConnection(readLines(f, n =
> 2)) : all connections are in use" I cannot ask for sessionInfo(). I
> get the error message
>>sessionInfo()
> Error in gzfile(file, "rb") : all connections are in use
>
> So I am presenting the sessionInfo() output after reading in the first
> 124 files.
>
>>sessionInfo()
> R version 2.4.0 (2006-10-03)
> i686-pc-linux-gnu
>
> locale:
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
> [7] "base"
>
> other attached packages:
> RSQLite      DBI
> "0.4-1" "0.1-10"

CRAN has RSQLite 0.4-13 and DBI 0.1-11.  You are using old software.
If you update, I think the problem will go away.  I can run your
example with N=130 without problem.

> Hopefully, this will be helpful in tracking down the source of the
> problem.


> # CLOSE THE CONNECTION

You might want to clear the result set first:

   dbClearResult(query01)

> sqliteCloseConnection(connect);

Why not:

  dbDisconnect(connect)

+ seth



More information about the R-help mailing list