s-news
[Top] [All Lists]

Error: Too many databases in use?

To: s-news@lists.biostat.wustl.edu
Subject: Error: Too many databases in use?
From: Sarah Henderson <sarah.henderson@ubc.ca>
Date: Sun, 29 Apr 2007 00:55:48 -0700

Hello S users --

I have a dataframe named (DATA.FRAME) with 70 observations and 92 sets of 5 columns. The name for each column includes an ID number (ID) to identify which set it belongs to.

I have written a function (PAIRWISE) to export scatterplots of the 10 pairwise combinations in each set. The function relies on this primary element (repeated five times to name the five vectors):


NAME1 <- paste("ONE", ID, sep="")
VECTOR1 <- get(NAME1, where=DATA.FRAME)

...

NAME5 <- paste("FIVE", ID, sep="")
VECTOR5 <- get(NAME5, where=DATA.FRAME)


Then I use lapply(1:92, PAIRWISE) to run the whole shebang. The function does what it's supposed to, but when the lapply is used it will only process the first four values in the list before I get this error:

Error in get.default(NAME1, where = DATA.FRAME): Too many databases in use, maximum is 50

However, I can run items 5:8 immediately after items 1:4 without making any changes -- it's as if databases are accumulating in the function, and clearing as soon as it breaks. Does anyone know how I can avoid this error to run the script smoothly from 1:92? If this isn't enough information I am happy to supply the whole script (it's somewhat unweildly...).

Many thanks,

Sarah

<Prev in Thread] Current Thread [Next in Thread>