create hash value for each row of data in dataframe in R

后端 未结 2 1078
终归单人心
终归单人心 2021-01-19 03:25

I am exploring how to compare two dataframe in R more efficiently, and I come up with hash.

My plan is to create hash for each row of data in two dataframe with same

2条回答
  •  无人及你
    2021-01-19 03:37

    If I get what you want properly, digest will work directly with apply:

    library(digest)
    ssi.10q3.v1.hash <- data.frame(uid = 1:nrow(ssi.10q3.v1), hash = apply(ssi.10q3.v1, 1, digest))
    

提交回复
热议问题