Re: [R] Compress string memCompress/Decompress

2010-07-12 Thread Erik Wright
Hi Seth, Can you recreate the example below using dbWriteTable? Thanks!, Erik On Jul 11, 2010, at 6:13 PM, Seth Falcon wrote: > On Sun, Jul 11, 2010 at 11:31 AM, Matt Shotwell wrote: >> On Fri, 2010-07-09 at 20:02 -0400, Erik Wright wrote: >>> Hi Matt, >>> >>> This works great, thanks! >>>

Re: [R] Compress string memCompress/Decompress

2010-07-12 Thread Seth Falcon
On Mon, Jul 12, 2010 at 9:17 AM, Erik Wright wrote: > Hi Seth, > > Can you recreate the example below using dbWriteTable? > Not sure if that is possible with the current dbWriteTable code (don't have time to explore that right now). You are welcome to poke around. You could wrap the example in a

Re: [R] Compress string memCompress/Decompress

2010-07-11 Thread Seth Falcon
On Sun, Jul 11, 2010 at 11:31 AM, Matt Shotwell wrote: > On Fri, 2010-07-09 at 20:02 -0400, Erik Wright wrote: >> Hi Matt, >> >> This works great, thanks! >> >> At first I got an error message saying BLOB is not implemented in RSQLite.   >> When I updated to the latest version it worked. > > SQLit

Re: [R] Compress string memCompress/Decompress

2010-07-11 Thread Matt Shotwell
On Fri, 2010-07-09 at 20:02 -0400, Erik Wright wrote: > Hi Matt, > > This works great, thanks! > > At first I got an error message saying BLOB is not implemented in RSQLite. > When I updated to the latest version it worked. SQLite began to support BLOBs from version 3.0. > > Is there any rea

Re: [R] Compress string memCompress/Decompress

2010-07-09 Thread Erik Wright
Hi Matt, This works great, thanks! At first I got an error message saying BLOB is not implemented in RSQLite. When I updated to the latest version it worked. Is there any reason the string needs to be stored as type BLOB? It seems to work the same when I swap "BLOB" with "TEXT" in the CREATE

Re: [R] Compress string memCompress/Decompress

2010-07-09 Thread Matt Shotwell
Erik, Can you store the data as a blob? For example: > #create string, compress with gzip, convert to SQLite blob string > string <- "gzip this string, store as blob in SQLite database" > string.gz <- memCompress(string, type="gzip") > string.sqlite <- paste("x'",paste(string.gz,collapse=""),"'"