Skip to content
Prev 443 / 1559 Next

dbSendPreparedQuery in RSQLite

On Apr 17, 2008, at 4:19 PM, Sean Davis wrote:
Certainly the downstream analysis usually corresponds to some summary  
measure of a region. I am not too familiar with sqlite, but it does  
appear that I have the normal sum, max, min, avg functions which will  
be nice to use when applicable, however there is clearly a desire for  
access to the data within each region when these functions won't  
suffice (fitting models, calculating variances, and quantiles). That  
being said, your point is well taken, often the data.frame  
representation is more of what you want and now I provide both  
interfaces.

As an aside I implemented the method where I split using the bounds of  
each region determined via an SQL query (i.e. I got the number of rows  
corresponding to each region in the resulting data.frame). I then used  
an apply to partition these regions into the resulting list (where  
each element is a data.frame). This was to determine whether or not I  
was paying a cost for the the fact that split assumes that my data is  
unsorted according to the factor -- the results were not encouraging:  
the time spent in sorting during the split seems to pale in comparison  
to the construction of all the region data.frames. In any case, for  
now the running time is more or less acceptable.

thanks again, jim