reimplement redisConnect in R