<div dir="ltr">I didn't see a separate mailing list for rcppredis, so posting here...<div><br></div><div>Does anyone know how to set a value with a space in it from rcppredis?</div><div><br></div><div>I can do it from the command line:</div>
<div><div>warmstrong@krypton:~/dvl/c++/redis.example$ redis-cli SADD hats 'my big hat'</div><div>(integer) 1</div><div>warmstrong@krypton:~/dvl/c++/redis.example$ redis-cli SMEMBERS hats</div><div>1) "my big hat"</div>
</div><div><br></div><div><br></div><div>but from R, my attempts with single quotes within double quotes and other tricks do not work:</div><div><br></div><div><div>> redis$exec("SADD hats 'my other big hat'")</div>
<div>[1] 4</div><div>> redis$exec("SMEMBERS hats")</div><div>[[1]]</div><div>[1] "my big hat"</div><div><br></div><div>[[2]]</div><div>[1] "other"</div><div><br></div><div>[[3]]</div><div>
[1] "'my"</div><div><br></div><div>[[4]]</div><div>[1] "big"</div><div><br></div><div>[[5]]</div><div>[1] "hat'"</div><div><br></div><div>> </div></div><div><br></div><div>If anyone knows the correct way to escape the quotes to get this to work, that would be great.</div>
<div><br></div><div>Otherwise, it seems like I'm going to have to use the multi argument version of redisCommand:</div><div>reply = redisCommand(c,"SADD %s %s", "hats", "my other big hat");<br>
</div><div><br></div><div>which is not yet exposed in rcppredis...</div><div><br></div><div>-Whit</div><div>  </div></div>