VicKat
VicKat

Reputation: 51

Transfer data to redis using R // redux

I have read a .CSV file in R using the read.csv() command. I have established a connection to Redis and now I need to transfer the dataframe as-is (csv content that I loaded in R) to redis.

I'm using the r$HMSET() to multi-set values, but this means that I enter all the data of each entry manually by myself.

Is there a command that automatically transfers all the data?

Most sources I was able to find uses Python or rredis package so it is not very helpful to me since I have to use R and redux.

Upvotes: 2

Views: 421

Answers (1)

VicKat
VicKat

Reputation: 51

Solved.

I used the r$RPUSH command within a for loop (running for the length of my .csv file).

Upvotes: 1

Related Questions