title: Store large dataframes in redis through R
body: <p>I have a number of large dataframes in R which I was planning to store using redis. I am totally new to redis but have been reading about it today and have been using the R package <code>rredis</code>. </p>
  
  <p>I have been playing around with small data and saved and retrieved small dataframes using the <code>redisSet()</code> and <code>redisGet()</code> functions. However when it came to saving my larger dataframes (the largest of which is 4.3 million rows and 365MB when saved as .RData file)
  using the code <code>redisSet('bigDF', bigDF)</code> I get the following error message:</p>
  
  <pre><code>Error in doTryCatch(return(expr), name, parentenv, handler) : 
    ERR Protocol error: invalid bulk length
  In addition: Warning messages:
  1: In writeBin(v, con) : problem writing to connection
  2: In writeBin(.raw("\r\n"), con) : problem writing to connection
  </code></pre>
  
  <p>Presumably because the dataframe is too large to save. I know that redisSet writes the dataframe as a string, which is perhaps not the best way to do it with large dataframes. Does anyone know of the best way to do this?</p>
  
  <p>EDIT: I have recreated the error my creating a very large dummy dataframe:</p>
  
  <pre><code>bigDF &lt;- data.frame(
  'lots' = rep('lots',40000000),
  'of' = rep('of',40000000),
  'data' = rep('data',40000000),
  'here'=rep('here',40000000)
  )
  </code></pre>
  
  <p>Running <code>redisSet('bigDF',bigDF)</code> gives me the error:</p>
  
  <pre><code> Error in .redisError("Invalid agrument") : Invalid agrument
  </code></pre>
  
  <p>the first time, then running it again immediately afterwards I get the error </p>
  
  <pre><code>Error in doTryCatch(return(expr), name, parentenv, handler) : 
    ERR Protocol error: invalid bulk length
  In addition: Warning messages:
  1: In writeBin(v, con) : problem writing to connection
  2: In writeBin(.raw("\r\n"), con) : problem writing to connection
  </code></pre>
  
  <p>Thanks</p>