Created
March 18, 2016 09:04
-
-
Save gdemin/7cb4cc0a391f2c0bca1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
comments_and_post$rang_posta = rep(NA, length(comments_and_post$post_id)) | |
for (i in 1:length(comments_and_post$post_id)){ | |
if (!is.na(comments_and_post$id[i])) { | |
comments_and_post$rang_posta[i] <- length( | |
unique( | |
comments_and_post$post_id[ | |
comments_and_post1$post_id>comments_and_post1$post_id[i] & | |
comments_and_post$post_owner_id == comments_and_post$post_owner_id[i] & | |
comments_and_post$post_date.x < comments_and_post$date[i] | |
] | |
) | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment